ajeetdsouza / loxcraft

Language tooling for the Lox programming language.
https://ajeetdsouza.github.io/loxcraft/
MIT License
274 stars 11 forks source link

Parser error recovery #7

Closed ajeetdsouza closed 2 years ago

ajeetdsouza commented 2 years ago

LALRPOP allows error recovery so that more than 1 error can be generated at a time: https://lalrpop.github.io/lalrpop/tutorial/008_error_recovery.html

For example, Gluon uses a RecoverError block: https://github.com/gluon-lang/gluon/blob/master/parser/src/grammar.lalrpop

ajeetdsouza commented 2 years ago

Fixed in https://github.com/ajeetdsouza/lox/commit/1b4b10129057819dc81a4f540d06ae314d129747.