File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2767,17 +2767,20 @@ fn ParseRegexTreeDepth(comptime sq: []const RegexSymbol) type {
27672767 if (s .escaped and isCharFunction (s .char )) {
27682768 break :outer RegexUnit (BindCharFunction (s .char , s .negated ), q );
27692769 } else {
2770- switch (s .char ) {
2771- '.' = > break :outer RegexUnit (anyRegex , q ),
2772- '^' = > {
2773- if (q != null ) @compileError ("Symbol '^' cannot have a quantifier." );
2774- break :outer RegexUnit (startsWithRegex , null );
2775- },
2776- '$' = > {
2777- if (q != null ) @compileError ("Symbol '$' cannot have a quantifier." );
2778- break :outer RegexUnit (endsWithRegex , null );
2779- },
2780- else = > {},
2770+
2771+ if (! s .escaped ) {
2772+ switch (s .char ) {
2773+ '.' = > break :outer RegexUnit (anyRegex , q ),
2774+ '^' = > {
2775+ if (q != null ) @compileError ("Symbol '^' cannot have a quantifier." );
2776+ break :outer RegexUnit (startsWithRegex , null );
2777+ },
2778+ '$' = > {
2779+ if (q != null ) @compileError ("Symbol '$' cannot have a quantifier." );
2780+ break :outer RegexUnit (endsWithRegex , null );
2781+ },
2782+ else = > {},
2783+ }
27812784 }
27822785 }
27832786
You can’t perform that action at this time.
0 commit comments