feat: treat semicolons as line tokens in wren compiler lexer

Add a new case in the `readRawToken` function within `src/wren_compiler.c` to map the semicolon character to the `TOKEN_LINE` token type, enabling semicolons to function as line separators in the Wren language parser.

Include a test file `test/semicolon.wren` that verifies the new behavior by using a semicolon to separate two statements on a single line, with the expected output "ok".
This commit is contained in:
Bob Nystrom
2013-12-05 03:12:21 +00:00
parent 67aea3f676
commit 6451c86b28
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
var a = "ok"; io.write(a) // expect: ok