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

Visit replaced nodes #27

Merged
merged 1 commit into from
May 30, 2024

Conversation

davepagurek
Copy link
Contributor

I did a little test of Babel and found that when you replace a node in enter, exit will not be called for that node. I've made the logic here mirror that: if a node gets replaced, it will just visit that node directly, which will then visit its children recursively. Otherwise, it will continue on to the children of the current node and then call exit.

@AndrewRayCode AndrewRayCode self-requested a review May 30, 2024 21:25
@AndrewRayCode
Copy link
Collaborator

Wonderful! Thank you - and great test

@AndrewRayCode AndrewRayCode merged commit b025d75 into ShaderFrog:main May 30, 2024
1 check passed
@davepagurek davepagurek deleted the fix/visit-replaced-node branch May 30, 2024 21:58
@AndrewRayCode
Copy link
Collaborator

Thanks for the help. Released in @shaderfrog/[email protected]

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.

2 participants