From 6616abf57fdd03cdc32f90b57272af889891ccda Mon Sep 17 00:00:00 2001 From: David Gonzalez Martin Date: Sun, 3 Sep 2023 21:04:06 -0600 Subject: [PATCH] add carriage return and tabs to the lexer --- src/lexer.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lexer.zig b/src/lexer.zig index 424a6a7..ad9b440 100644 --- a/src/lexer.zig +++ b/src/lexer.zig @@ -137,10 +137,10 @@ pub fn lex(allocator: Allocator, text: []const u8) !Result { }, }); }, - ' ', '\n' => index += 1, + ' ', '\n', '\r', '\t' => index += 1, else => |foo| { index += 1; - std.debug.panic("NI: {c}", .{foo}); + std.debug.panic("NI: {c} 0x{x}", .{ foo, foo }); }, } }