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

[interpreter] Source locations are broken since menhir switch #1723

Closed
rossberg opened this issue Feb 6, 2024 · 2 comments
Closed

[interpreter] Source locations are broken since menhir switch #1723

rossberg opened this issue Feb 6, 2024 · 2 comments

Comments

@rossberg
Copy link
Member

rossberg commented Feb 6, 2024

I only noticed now that the switch to menhir in #1705 completely broke the implementation of source locations for the AST – they are all empty, producing useless messages for type or runtime errors.

The current implementation depends on reading out Parsing.symbol_start/end_pos, which are defunct with menhir.

Unfortunately, menhir offers no easy substitute – afaict we'll need to change every single rule to use $sloc and $loc($i). Or revert #1705.

@zapashcanon, can you please look into this?

@rossberg
Copy link
Member Author

rossberg commented Feb 6, 2024

Never mind, I fixed it: 5b26fa2

@rossberg rossberg closed this as completed Feb 6, 2024
@zapashcanon
Copy link
Contributor

Oh, sorry about that. Thanks for the quick fix.

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

2 participants