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
implement a visitor helper in order to handle AST transversal :
constast=parser.parse('...some code...');// visiting child nodes :ast.visit(function(node){// do something});// filtering a list of nodesconstnodes=ast.filter(function(node){returnnode.kind==='something';});
NOTE : this is implemented on each node, can be used on program node as in the example, or on any other node
The text was updated successfully, but these errors were encountered:
Is anything happening with this? I'm trying to get a complete traversable AST but from the types and documentation, I cannot tell how basic traversing is supposed to be achieved. I am very interested in using this package but am having trouble getting started. Any help would be appreciated.
Does anyone have a demo of basic tree traversal? I can only see as deep as the class declaration. Also, the AST seems to print nicely but is showing no children of my class, and no errors...
implement a visitor helper in order to handle AST transversal :
The text was updated successfully, but these errors were encountered: