diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2026-08-01 20:10:10 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2026-08-01 20:10:10 +0200 |
| commit | 77642e5081b4ed2516dc08b3ef611c3c444ec6c5 (patch) | |
| tree | 7874546e2357e33346f0b91bb1ac023283cae7fb /src/z/js/parser/builtin.zig | |
| parent | c8744f9f6a28a23b83603435a3ad987f0d9f181b (diff) | |
restructure parser
Diffstat (limited to 'src/z/js/parser/builtin.zig')
| -rw-r--r-- | src/z/js/parser/builtin.zig | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/z/js/parser/builtin.zig b/src/z/js/parser/builtin.zig deleted file mode 100644 index fc96fc3..0000000 --- a/src/z/js/parser/builtin.zig +++ /dev/null @@ -1,17 +0,0 @@ -const std = @import("std"); - -const parser = @import("root.zig"); -const Parser = parser.Parser; -const Result = parser.Result; - -pub fn literal(lit: []const u8) Parser(void) { - return .fromType(struct { - pub fn parse(buffer: []const u8) !Result(void) { - if (std.mem.startsWith(u8, buffer, lit)) { - return .{ void{}, buffer[lit.len..] }; - } - - return error.Literal; - } - }); -} |