Commit Graph
2 Commits
Author SHA1 Message Date
Bob Nystrom 1951059c8f 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.
2015-01-03 18:02:45 +00:00
Bob Nystrom a665e14804 feat: add regression test for function with 8195 constants exceeding limit
Add a new test file `test/limit/too_many_constants.wren` containing a single function with 8195 integer literal constants to verify the compiler correctly rejects functions that exceed the maximum constant count limit.
2014-12-07 00:39:39 +00:00