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

Improve Scheme compiler error messages #46

Open
hawkw opened this issue Apr 8, 2015 · 2 comments
Open

Improve Scheme compiler error messages #46

hawkw opened this issue Apr 8, 2015 · 2 comments

Comments

@hawkw
Copy link
Owner

hawkw commented Apr 8, 2015

It would be really nice if the compile error messages carried over source position information.

This would require modifications to the AST to allow AST nodes to be annotated with position information from the parser. This wouldn't be particularly difficult, but it would take some work, so I'm moving this to the Scheme v2.0 milestone as I'd rather focus on higher-priority issues (i.e. #15 and #14 ).

Also, carrying this extra data around might make the compiler slightly slower. In scenarios where a binary is being compiled, this isn't a significant problem, but if the Scheme compiler is running as a line-by-line interpreter, every nanosecond counts. Therefore, it would be nice if this could be done conditionally.

@hawkw
Copy link
Owner Author

hawkw commented Apr 10, 2015

I made a dev branch for this and started messing with it. Not sure when I'll actually get around to finishing it.

@hawkw
Copy link
Owner Author

hawkw commented Apr 16, 2015

Other compiler error message improvements:

  • consider making the CompileResult type's error component carry a list of error messages rather than a single one.
  • give AST nodes the ability to reconstruct the lines of source code they were built from (since Lisp code is Basically Just Its' Own AST anyway)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant