aboutsummaryrefslogtreecommitdiff
path: root/src/z/parser/js/grammar/keyword.zig
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2026-08-05 09:08:24 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2026-08-05 09:08:24 +0200
commit0eaa2a420cb699cdb23ce9b1573560a5d9e59a31 (patch)
tree7c33f4be58e47aa6c1641b66442216352fa3f36b /src/z/parser/js/grammar/keyword.zig
parent356c2bc0ccb1794b5ec219079d8c5b85ddcc4c87 (diff)
add regex literals
Diffstat (limited to 'src/z/parser/js/grammar/keyword.zig')
-rw-r--r--src/z/parser/js/grammar/keyword.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/z/parser/js/grammar/keyword.zig b/src/z/parser/js/grammar/keyword.zig
index c3b32ac..8e99b4a 100644
--- a/src/z/parser/js/grammar/keyword.zig
+++ b/src/z/parser/js/grammar/keyword.zig
@@ -72,6 +72,8 @@ pub const Keyword = enum {
@setEvalBranchQuota(10000);
errdefer lexer.revert();
+ lexer.context.regex_possible = true;
+
const index = std.mem.findNone(u8, lexer.buffer, std.ascii.lowercase) orelse lexer.buffer.len;
if (index == 0) return Lexer.Error.UnexpectedToken;