Skip to content

Conversation

@doorgan
Copy link
Contributor

@doorgan doorgan commented Jan 20, 2026

Fix #75

The issue was that stab_state was leaking into inner stabs, corrupting the parser state and causing the wrong tokens to be handed to parse_stab_expression. Resetting the state seems to fix this. The other solution I found was to add a fallback clause to parse_stab_expression but that felt too hacky because we were still dealing with corrupt parser state.

Also adds a bunch of tests for stabs to make sure the stab_state logic is not breaking anything else

@doorgan doorgan force-pushed the doorgan/identifier-crash branch from 21bd982 to 26f3657 Compare January 20, 2026 18:02
@mhanberg mhanberg force-pushed the doorgan/identifier-crash branch from 26f3657 to 40bf73d Compare January 20, 2026 18:28
@mhanberg mhanberg merged commit 365007b into elixir-tools:main Jan 20, 2026
37 checks passed
@doorgan
Copy link
Contributor Author

doorgan commented Jan 20, 2026

I think this also fixed #74 because the traces hit the same clause, but I'm still trying to come up with a reproduction case to confirm

@doorgan
Copy link
Contributor Author

doorgan commented Jan 20, 2026

It partially fixed #74, I found that this:

Spitfire.parse("a -> b -> fn} -> c")

Used to crash with the error reported in that issue, and after this fix it now returns {:error, :no_fuel_remaining}, so it's not completely fixed. I'll update that issue and work on a separate fix

@doorgan doorgan mentioned this pull request Jan 20, 2026
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

Successfully merging this pull request may close these issues.

Error parsing :identifier tokens

2 participants