You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
...currently, I'm just invoking estraverse.replace(newroot, { ... }) again with the same enter/exits, 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:
I don't think you should modify parent from child's traversal. Better to do if (...) from your parent BlockStatement, in that case you will definitely have no side effects + will get traversal over new nodes for free.
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: