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

Error messages with source location. #32

Open
4 tasks
alcides opened this issue Mar 2, 2024 · 0 comments
Open
4 tasks

Error messages with source location. #32

alcides opened this issue Mar 2, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@alcides
Copy link
Owner

alcides commented Mar 2, 2024

When there is a type checking or evaluation error, it would be desirable that the terminal shows the surrounding source code, and notes indicating what went wrong (see the rust compiler for an example).

To implement this:

  • Sugar AST/Parser needs to separate from Core.
  • Sugar nodes need to contain the source location (begin and end).
  • Core AST nodes should have a source (that should be pointing at either Sugar nodes, or their original location).
  • In case of an error, that should be caught at the sugar processor, and the error should be printed in the context of the sugar program.
@alcides alcides added good first issue Good for newcomers enhancement New feature or request help wanted Extra attention is needed labels Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant