Skip to content

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

Merged
merged 9 commits into from
Jun 8, 2025
Merged

Conversation

rexim
Copy link
Member

@rexim rexim commented Jun 7, 2025

@yui-915 @deniska @mikmart @Miezekatze64 Please let me know what you think about this? Do you notice any UX problems?

Copy link
Contributor

@yui-915 yui-915 left a 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!

@mikmart
Copy link
Contributor

mikmart commented Jun 7, 2025

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

@nullnominal
Copy link
Contributor

LEXER ERROR: Character literal contains more than two characters can probably be ignored

@rexim
Copy link
Member Author

rexim commented Jun 8, 2025

Thank you everyone for your feedback!

@rexim rexim merged commit 697654a into main Jun 8, 2025
4 checks passed
@rexim rexim deleted the continue-compilation branch June 8, 2025 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants