Skip to content

wasm: Maintain rightmost failure position during parse - #523

Merged
pdubroy merged 11 commits into
mainfrom
pdubroy/wasm-failurePos
Jul 26, 2025
Merged

wasm: Maintain rightmost failure position during parse#523
pdubroy merged 11 commits into
mainfrom
pdubroy/wasm-failurePos

Conversation

@pdubroy

@pdubroy pdubroy commented Jul 26, 2025

Copy link
Copy Markdown
Contributor
  • Add a global (rightmostFailurePos) to track the rightmost failure position
  • Rule eval functions maintain the value in a local (failurePos) which is initialized from the global, and pushed back (if applicable) at the end of the rule body.
  • Changes the representation of the memo entries and CST nodes, to allow failurePos to be memoized.
  • Add a property-based test (using fast-check) for getRightmostFailurePosition

@pdubroy
pdubroy merged commit 31dbfa0 into main Jul 26, 2025
3 checks passed
@pdubroy
pdubroy deleted the pdubroy/wasm-failurePos branch July 26, 2025 19:57
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.

1 participant