bolt icon indicating copy to clipboard operation
bolt copied to clipboard

Parser error recovery

Open mckoss opened this issue 10 years ago • 1 comments

Bolt currently will only report one syntax error at a time (the first one found).

Expect:

The parser to advance to the next statement and resume parsing so all the errors in the file can be reported on (and fixed) at once.

mckoss avatar Nov 05 '15 21:11 mckoss

Note the poor error messages for problems like this:

path /x {
  read(): true
}

Result:

bolt:1:1: Expected comment, end of input, function definition, path statement, type statement or whitespace but "p" found.

Expect something like:

bolt:2:9: Expected "=" but ":" found.

mckoss avatar Jan 06 '16 17:01 mckoss