feat: remove semicolon token from lexer and treat it as invalid syntax
Remove the `;` case from the `nextToken` function in `wren_compiler.c` so that semicolons are no longer lexed as `TOKEN_LINE`. Update the documentation in `doc/site/syntax.markdown` to describe newlines as the sole statement separator, and adjust all test files (`test/limit/many_constants.wren`, `test/limit/many_globals.wren`, `test/limit/too_many_constants.wren`, `test/semicolon.wren`) to reflect that semicolons now produce an error instead of being treated as line breaks.
This commit is contained in:
+65535
-8192
File diff suppressed because it is too large
Load Diff
+65472
-8184
File diff suppressed because it is too large
Load Diff
+65536
-8192
File diff suppressed because it is too large
Load Diff
+2
-1
@@ -1 +1,2 @@
|
||||
var a = "ok"; IO.print(a) // expect: ok
|
||||
// Semicolons are not valid separators.
|
||||
var a = "ok"; IO.print(a) // expect error
|
||||
|
||||
Reference in New Issue
Block a user