Like I said on the bug, *I* understand this, as do you, but we
shouldn't require error messages for something relatively simple like
this to be understandable to only someone who has read and understood
subtle nuances in the spec or already knows the language well.
the scanner/token is a part of gc program. the semicolon is inserted by gc and puzzled gc? IMO "insert semicolons" is compiler's internal implementation, and should not appear in language specs.
Le 13 juin 2013 07:55, "Kevin Gillette" <extempor...@gmail.com> a écrit :
>
> It would be easy enough to correct, but requires reading an extra token ahead as soon as this current error is seen, just to make the determination that a '{' is missing.
>
I don't understand this, how can you know there is an error unless you have read an extra token?
It already happens, and the message needs simply say "instead of expected {" (for example) instead of "before {".
Rémy.
and give an error that a semicolon is missing after foo()?
Yes, but a semicolon without a condition expression would not be valid.