Lines Matching refs:visitors
4 The most common way to work with the AST is by using a node traverser and one or more node visitors.
36 Node visitors
253 Multiple visitors
256 A single traverser can be used with multiple visitors:
265 It is important to understand that if a traverser is run with multiple visitors, the visitors will
290 visitors, with the `leaveNode()` calls happening in the reverse order of the `enterNode()` calls.
291 Running multiple visitors in parallel improves performance, as the AST only has to be traversed
292 once. However, it is not always possible to write visitors in a way that allows interleaved
304 When using multiple visitors, it is important to understand how they interact with the various
308 visitors.
310 visitors, and all *subsequent* visitors will not visit the current node.
311 * If *any* visitor returns `STOP_TRAVERSAL`, traversal is stopped for *all* visitors.
312 * If a visitor returns a replacement node, subsequent visitors will be passed the replacement node,
314 * If a visitor returns `REMOVE_NODE`, subsequent visitors will not see this node.
315 * If a visitor returns `REPLACE_WITH_NULL`, subsequent visitors will not see this node.
316 * If a visitor returns an array of replacement nodes, subsequent visitors will see neither the node