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

[LCGS] Add compile errors #42

Closed
NicEastvillage opened this issue Nov 24, 2020 · 1 comment · Fixed by #232
Closed

[LCGS] Add compile errors #42

NicEastvillage opened this issue Nov 24, 2020 · 1 comment · Fixed by #232
Assignees
Labels
enhancement New feature or request refactoring Rewriting or restructuring of existing features

Comments

@NicEastvillage
Copy link
Contributor

NicEastvillage commented Nov 24, 2020

Currently the program crashes with a sometimes-helpful message, whenever the LCGS program is faulty. Ideally it should give a (or multiple) compiler errors describing exactly what is wrong.

Additionally, the compile errors can be improved immensely if we calculate the spans of AST nodes. That is, the start and end position of the text that resulting in the AST node. Span is already defined in lcgs::parse.rs as well as a helper function to capture the spans of parsed text.

@NicEastvillage NicEastvillage added the enhancement New feature or request label Nov 24, 2020
@NicEastvillage
Copy link
Contributor Author

I found a great article that will help us in this endeavour: https://eyalkalderon.com/blog/nom-error-recovery/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactoring Rewriting or restructuring of existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant