summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--examples/5.src4
-rw-r--r--src/tokenizer.zig2
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/5.src b/examples/5.src
index 3582794..521b9d7 100644
--- a/examples/5.src
+++ b/examples/5.src
@@ -1,7 +1,7 @@
-let printOne = () => {
+let print_one = () => {
 	print(1);
 };
 
-printOne();
+print_one();
 
 return 0;
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;
         }