- Notifications
You must be signed in to change notification settings - Fork 72
Open
Milestone
Description
implement a visitor helper in order to handle AST transversal :
const ast = parser.parse('...some code...'); // visiting child nodes : ast.visit(function(node) { // do something }); // filtering a list of nodes const nodes = ast.filter(function(node) { return node.kind === 'something'; });
NOTE : this is implemented on each node, can be used on program node as in the example, or on any other node
matzeeable and kaermorchen