Example in example folder doesnt work. no "generic_transform" function#23
Example in example folder doesnt work. no "generic_transform" function#23SavSanta wants to merge 1 commit intoKronuz:masterfrom
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