grammars-v4 icon indicating copy to clipboard operation
grammars-v4 copied to clipboard

Golang: Missing semicolons not properly induced

Open nicoberling opened this issue 3 years ago • 0 comments

The parser currently doesn't induce semicolons correctly: The statementList

i := a
+b

is parsed as a single line i := a + b: semi but a semicolon should have been inserted after the identifier a, giving

i := a;
+b;

where the second statement would give us an error in Go because the value is never used, but is syntactically correct, and should get parsed.

nicoberling avatar Feb 03 '22 22:02 nicoberling