Lines Matching refs:nodes
43 public function beforeTraverse(array $nodes);
46 public function afterTraverse(array $nodes);
155 sense to remove nodes of type `Node\Stmt`, as they always occur inside statement lists (and a few
178 Another way to remove nodes is to replace them with `null`. For example, all `else` statements could
192 Next to removing nodes, it is also possible to replace one node with multiple nodes. This
211 An AST can easily contain thousands of nodes, and traversing over all of them may be slow,
217 checking all it's child nodes, because PHP does not allow nesting classes. In this case, you can
316 * If a visitor returns an array of replacement nodes, subsequent visitors will see neither the node
317 that was replaced, nor the replacement nodes.
323 for minor tasks. For this reason a `NodeFinder` is provided, which can find AST nodes that either
332 // Find all class nodes.
357 The node visitor mechanism is somewhat rigid, in that it prescribes an order in which nodes should
362 PHP-Parser does not add parent (or sibling) references to nodes by default, but you can enable them