Skip to content
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

Partial downstream compilation post-error #7

Open
TheIttyBittyGalaxy opened this issue Jun 2, 2024 · 0 comments
Open

Partial downstream compilation post-error #7

TheIttyBittyGalaxy opened this issue Jun 2, 2024 · 0 comments

Comments

@TheIttyBittyGalaxy
Copy link
Owner

At the moment, each stage of the compiler (parsing, resolving, checking) will make a best-effort to complete, even if there were errors during the previous stage. The idea behind this is that the user should be presented with as many (accurate) error messages as possible before having to recompile. (e.g. if the compiler exited after just one syntax error, it wouldn't be able to report to the user any type checking errors, which it probably is able to report on).

However, this does make programming the "downstream" stages much more complicated, as they have to be able to handle various "invalid" APM structures.

It might be a good idea to mark portions of the APM as "bad", which will cause down stream stages to essentially ignore it, or at least treat it in a different way. My gut says either individual statements would be marked as bad, or perhaps whole code blocks?

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

No branches or pull requests

1 participant