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

Support returning multiple errors from compilation #10

Open
200sc opened this issue Aug 19, 2021 · 1 comment
Open

Support returning multiple errors from compilation #10

200sc opened this issue Aug 19, 2021 · 1 comment

Comments

@200sc
Copy link
Owner

200sc commented Aug 19, 2021

Code generation is currently split into three components, and all of them will need adjustments to report multiple errors:

Tokenization:

  • EOF errors can remain as they are
  • non-EOF errors will need to attempt to guess what the token should have been?

Parsing:

  • EOF errors can remain as they are
  • 'unexpected token' errors will need to ignore bad tokens or populate a best guess token instead (potentially looking ahead to see if the next token is the one we want)
  • There may be a book or guide for how to restructure this section to support these corrective fixes

Generation:

  • Should be the easiest, just have the existing Validate method build up errors instead of returning the first one it sees.
@200sc
Copy link
Owner Author

200sc commented Feb 11, 2022

With bebop v0.3.0, Tokenization is complete.

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