aboutsummaryrefslogtreecommitdiff
path: root/src/Lexer.zig
diff options
context:
space:
mode:
authorMathias Magnusson <mathias@magnusson.space>2025-07-29 23:01:38 +0200
committerMathias Magnusson <mathias@magnusson.space>2025-07-29 23:01:38 +0200
commitb368fe65bb45dc4414c9cc2dabc7d84fa7690c36 (patch)
tree2b6b8cb675318e24e1a9b49e4b75843685d16f2b /src/Lexer.zig
parent9f728121a17cbb997c18752d01d7529539966e94 (diff)
downloadhuginn-b368fe65bb45dc4414c9cc2dabc7d84fa7690c36.tar.gz
store local variables on the stack
Diffstat (limited to 'src/Lexer.zig')
-rw-r--r--src/Lexer.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Lexer.zig b/src/Lexer.zig
index 4a4d895..19e9cd4 100644
--- a/src/Lexer.zig
+++ b/src/Lexer.zig
@@ -134,7 +134,7 @@ fn integerLiteral(self: *Self) Token {
fn identifierOrKeyword(self: *Self) Token {
while (true) {
const c = self.peekChar() orelse 0;
- if ('a' <= c and c <= 'z' or 'A' <= c and c <= 'Z' or c == '_') {
+ if ('a' <= c and c <= 'z' or 'A' <= c and c <= 'Z' or c == '_' or '0' <= c and c <= '9') {
_ = self.eatChar();
continue;
}