summary refs log tree commit diff
path: root/src/tokenizer.zig
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2025-01-13 00:35:40 +0100
committerBaitinq <manuelpalenzuelamerino@gmail.com>2025-01-13 00:36:01 +0100
commite1c4dd5f3bfa7ebe5278e86e620be8139196686e (patch)
treee1fd17337c88a2d846b52aa505932505700270b6 /src/tokenizer.zig
parentTokenizer: Add support for tokenizing functions (diff)
downloadinterpreter-e1c4dd5f3bfa7ebe5278e86e620be8139196686e.tar.gz
interpreter-e1c4dd5f3bfa7ebe5278e86e620be8139196686e.tar.bz2
interpreter-e1c4dd5f3bfa7ebe5278e86e620be8139196686e.zip
Tokenizer: Add suport for underscores in identifier parsing
Diffstat (limited to 'src/tokenizer.zig')
-rw-r--r--src/tokenizer.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tokenizer.zig b/src/tokenizer.zig
index 17833e0..6513978 100644
--- a/src/tokenizer.zig
+++ b/src/tokenizer.zig
@@ -99,7 +99,7 @@ pub const Tokenizer = struct {
 
             const c = self.buf[self.offset];
 
-            if (!std.ascii.isAlphanumeric(c)) return self.buf[start..self.offset];
+            if (!std.ascii.isAlphanumeric(c) and c != '_') return self.buf[start..self.offset];
 
             self.offset += 1;
         }