-
Notifications
You must be signed in to change notification settings - Fork 129
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
Traverse down to new nodes in .replace() #29
Comments
I don't think you should modify parent from child's traversal. Better to do |
I have a similar problem, I do replace on a node (in leave), but want to do a traversal on the replacement node too. I tried pushing back to worklist and leavelist, but I am getting problems with escope then. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using estraverse.replace(), and I want to make new nodes, what's the best way to traverse down those new nodes?
For instance:
...currently, I'm just invoking
estraverse.replace(newroot, { ... })
again with the sameenter/exit
s, but I was wondering if there would be strange side effects to this of if there would be better ways.The text was updated successfully, but these errors were encountered: