Skip to content

Report error messages using source line information #245

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

Open
tekknolagi opened this issue Feb 26, 2025 · 0 comments
Open

Report error messages using source line information #245

tekknolagi opened this issue Feb 26, 2025 · 0 comments

Comments

@tekknolagi
Copy link
Owner

@neuroevolutus plumbed source information through to AST nodes. Now we should be able to report interpreter and compiler errors more neatly.

I think we should have some kind of API like report_error_from(astnode, ...) that raises an exception and a separate API that catches that exception and formats an error neatly using spans (kind of like ariadne or the CPython traceback module). The exception-catcher probably has the source text still available so we don't need to plumb that through the various SourceExtents along the way.

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