AST question: exclude subtree #92
-
I would like to exclude a node including its subtree from the AST (using I can write a transform like this:
which removes the children, but it keeps the empty
But the best way, I think, would be to somehow access the state and drop (pop) the node before it's added to the tree. But I don't see how to do that with the new API. Thoughts? On another note: I do like the new transform API, except for the removal of the bool return value of |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I've committed two changes:
I hope this solves your problems, if so, please close this issue. |
Beta Was this translation helpful? Give feedback.
-
FYI: I just refactored the parse tree support and added some initial documentation. Let me know if you have any questions, remarks, etc. |
Beta Was this translation helpful? Give feedback.
-
This is great, I like it! Yes, already your very first commit would have solved the issue, but |
Beta Was this translation helpful? Give feedback.
FYI: I just refactored the parse tree support and added some initial documentation. Let me know if you have any questions, remarks, etc.