Skip to content

Moved infix::calculate() from writers.cc, fixed problem with Ref lookups - #207

Open
matteB10 wants to merge 2 commits into
microsoft:mainfrom
matteB10:infix/small_fix
Open

Moved infix::calculate() from writers.cc, fixed problem with Ref lookups #207
matteB10 wants to merge 2 commits into
microsoft:mainfrom
matteB10:infix/small_fix

Conversation

@matteB10

Copy link
Copy Markdown
Contributor
  1. Moved the Rewriterinfix::calculate into its own file, calculate.cc to decouple and keep code coverage measures separate.
  2. Updated the exists and can_replace action functions. We discovered that the old can_replace failed to find any replaceable identifers during fuzzing, including when using --gen-bound to generate variables with symbol‑table bindings. The issue turned out to be that the rule called can_replace on the Ref node instead of its Ident child. Since generated Ref nodes don’t always share the same location as their Ident, the rule never matched. The updated version fixes this by applying the check directly to the Ident node.

Sign up for freeto 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

@matteB10