-
Notifications
You must be signed in to change notification settings - Fork 52
Continue compilation for as long as possible #121
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
Conversation
It let's you continue compiling even in case of some syntactical errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't try to "guess" the developer intentions and report nonsense errors (rust), which is good!
I like it! I tried to see how many errors I can get in a file, but it's surprisingly hard to not end up with some unrecoverable errors that abort compilation 😄 I often ended up with a bunch of these recoverable errors and ending with a non-recoverable one. One thing I'd maybe add is to always show the error count when compilation is aborted, even if we didn't reach the end of the compilation. For example I ended up with output like this often: $ build/b tests/goto.b
tests/goto.b:6:8: ERROR: expected `(`, but got identifier
tests/goto.b:6:14: ERROR: expected `)`, but got `{`
tests/goto.b:9:14: ERROR: label `en` used but not defined
tests/goto.b:11:5: ERROR: expected identifier, but got keyword `goto` But only got to see the error count if I only had recoverable errors like this: $ build/b tests/goto.b
tests/goto.b:6:15: ERROR: expected `)`, but got `{`
tests/goto.b:8:5: ERROR: expected `;`, but got `}`
tests/goto.b:9:14: ERROR: label `en` used but not defined
tests/goto.b:11:10: ERROR: label `loo` used but not defined
4 errors encountered |
LEXER ERROR: Character literal contains more than two characters can probably be ignored |
Thank you everyone for your feedback! |
@yui-915 @deniska @mikmart @Miezekatze64 Please let me know what you think about this? Do you notice any UX problems?