-
Notifications
You must be signed in to change notification settings - Fork 48
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
Example in example folder doesnt work. no "generic_transform" function #23
base: master
Are you sure you want to change the base?
Conversation
literal copy of transform_Object function into generic _transform function.
Are you able to change specific nodes using this method? Because for me it is changing all similar nodes to the same value. |
I dont rememeber. Though i think that was the case [that it affected every node] as looking at some of my current code that i can see from here. I ended up using the visit_node and then made calls to some additional functions i created to match what i need from the nodes and actionate if it does match. |
So were you able to use the |
No esprima based "transform" calls used. Made my own functions to verify and change what i needed and called out to them once they weree visited. Also no it wasnt a function literally called |
So you were able to transform, change or modify a specific node within your ast tree using the function you made? |
I had specific matches needed in my filters. So It was more than one node....but essentially yes if they matched my filter I could change it. Cheers |
How did you change it using the visit_node functions because I am having trouble changing the nodes that I want to change? |
literal copy of transform_Object function into generic _transform function.
Since I never completed CompSci algo and data structures this may not be the right implementation but you have no issues tab to discuss further and it worked in my limited testing