add carriage return and tabs to the lexer

This commit is contained in:
David Gonzalez Martin 2023-09-03 21:04:06 -06:00
parent b4cbdb5841
commit 6616abf57f

View File

@ -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 });
},
}
}