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

Does not traverse on manually appended nodes #104

Open
sanex3339 opened this issue Dec 29, 2019 · 1 comment
Open

Does not traverse on manually appended nodes #104

sanex3339 opened this issue Dec 29, 2019 · 1 comment

Comments

@sanex3339
Copy link
Contributor

sanex3339 commented Dec 29, 2019

replace walker does not traverse on manually appended nodes.

code:

var s = {'abc': 'cde'};

For example, when traversal enters in ObjectExpression node, it replaces this node and manually appends some other nodes at the parent BlockStatement node of this ObjectExpression node.

var s = {}; // this node is replaced by return from `enter` function
s['abc'] = 'abc'; // this node is appended manually

After that, traversal does not walk on newly added nodes on the current traversal loop in both enter and leave callbacks.

@sanex3339
Copy link
Contributor Author

I think, we should update worklist on leave stage of node, based on updated candidates

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

No branches or pull requests

1 participant