-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Fix Error Reporting #4
Comments
Can the parser recover from errors or does it just abort once an error has been found? |
It keeps on going, aborting because of errors are up to the CLI/compiler interface |
It would be bonkers to add a recovery system |
What do you mean with recovery system? |
a system where the parser can recover towards a valid grammar state. // When parsing arguments, we need to have "identifier ':' type"
// parse the identifier, if we fail to do that, skip till we find a ')'
recovered_expect(TokenType::Identifier, "an identifier", TokenType::OpenParen); This will allow multiple errors to be reported by the parser: function a(???: int) {
var a = ???;
}
|
As of right now, a lot of errors are double-reported within the parser code, and should ideally be resolved as soon as possible(most likely via function return codes)
It isn't of top priority, and can be fixed once the compiler is working
The text was updated successfully, but these errors were encountered: