diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2026-08-04 22:28:25 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2026-08-04 22:28:25 +0200 |
| commit | 356c2bc0ccb1794b5ec219079d8c5b85ddcc4c87 (patch) | |
| tree | defa9a0e3c46af6e59e3be3d3ac1482c8fad24c8 /src/z/parser/lexer.zig | |
| parent | 06d1607aabad0a967c0500efe305de3fa732f8d3 (diff) | |
add templates to tokenizer
Diffstat (limited to 'src/z/parser/lexer.zig')
| -rw-r--r-- | src/z/parser/lexer.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/z/parser/lexer.zig b/src/z/parser/lexer.zig index 40e1209..66d4211 100644 --- a/src/z/parser/lexer.zig +++ b/src/z/parser/lexer.zig @@ -42,6 +42,7 @@ pub fn Lexer(TokenKind: type) type { buffer: []const u8, last_buffer: []const u8, tokens: []const Token(TokenKind) = &.{}, + context: TokenKind.Context = .{}, pub fn init(buffer: []const u8) Self { return .{ @@ -119,6 +120,5 @@ pub fn Lexer(TokenKind: type) type { self.tokens = self.tokens ++ [_]Token(TokenKind){tok.stop(self)}; self.last_buffer = self.buffer; } - }; } |