feat: add test verifying carriage returns are treated as whitespace in parser
Add a new test file `test/ignore_carriage_returns.wren` that sprinkles carriage return characters (`\r`) in various positions within source code to confirm the parser correctly ignores them as whitespace. The test includes a deliberate compile error to validate that line numbering remains accurate despite the presence of carriage returns.
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
// Sprinkle some carriage returns to ensure they are ignored anywhere:
|
||||
IO␍.print("one"␍)
|
||||
IO.print␍("two")
|
||||
|
||||
// Generate a compile error so we can test that the line number is correct.
|
||||
+ * // expect error
|
||||
Reference in New Issue
Block a user