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

fix(compiler): Ensure constant number locations are propagated correctly when parsing #2044

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

ospencer
Copy link
Member

Closes #2042

I split the parsing of numbers into two distinct sets of rules: one for positive and one for negative numbers. This avoids a limitation with Menhir where $sloc locations aren't carried beyond a single rule. I don't think I'd go so far as to say this is a bug with Menhir, though. I kind of wish this could be solved with an %inline declaration, but they make an effort to have marking something inline not affect how the locations work. I may open an issue to ask/suggest a solution for this.

@ospencer ospencer added this pull request to the merge queue Feb 21, 2024
Merged via the queue into main with commit 53a33e6 Feb 21, 2024
12 checks passed
@ospencer ospencer deleted the oscar/number-locs branch February 21, 2024 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Grainfmt: Comment lost when preceding a number
2 participants