diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2026-08-05 09:10:06 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2026-08-05 09:10:06 +0200 |
| commit | 9b63c0f568832085b75ea6e3e983dc6cbeccfea4 (patch) | |
| tree | 179a26a1895eeaa531e457a79370794487371e73 /src/z/parser/js | |
| parent | 0eaa2a420cb699cdb23ce9b1573560a5d9e59a31 (diff) | |
regex literal set token kinddev
Diffstat (limited to 'src/z/parser/js')
| -rw-r--r-- | src/z/parser/js/grammar/literal.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/z/parser/js/grammar/literal.zig b/src/z/parser/js/grammar/literal.zig index 71b990d..4316dee 100644 --- a/src/z/parser/js/grammar/literal.zig +++ b/src/z/parser/js/grammar/literal.zig @@ -15,6 +15,7 @@ pub const Literal = union(enum) { middle, end, }, + regex: void, const digits = "_0123456789abcdef"; @@ -121,6 +122,7 @@ pub const Literal = union(enum) { } } else return Lexer.Error.UnexpectedToken, '/' => if (regex_possible) { + token.kind.literal = .regex; while (true) { switch (try lexer.consume()) { '/' => break, |