Searched refs:visitors (Results 1 – 9 of 9) sorted by relevance
/PHP-Parser/lib/PhpParser/ |
H A D | NodeTraverser.php | 27 protected array $visitors = []; variable in PhpParser\\NodeTraverser 37 public function __construct(NodeVisitor ...$visitors) { argument 38 $this->visitors = $visitors; 47 $this->visitors[] = $visitor; 54 $index = array_search($visitor, $this->visitors); 56 array_splice($this->visitors, $index, 1, []); 70 foreach ($this->visitors as $visitor) { 78 for ($i = \count($this->visitors) - 1; $i >= 0; --$i) { 79 $visitor = $this->visitors[$i]; 139 $visitor = $this->visitors[$visitorIndex]; [all …]
|
/PHP-Parser/doc/component/ |
H A D | Walking_the_AST.markdown | 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 292 once. However, it is not always possible to write visitors in a way that allows interleaved 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. 314 * If a visitor returns `REMOVE_NODE`, subsequent visitors will not see this node. [all …]
|
/PHP-Parser/doc/ |
H A D | README.md | 14 * Node visitors 17 * Interleaved visitors
|
H A D | 0_Introduction.markdown | 92 * Infrastructure for traversing and changing the AST (node traverser and node visitors).
|
H A D | 2_Usage_of_basic_components.markdown | 329 All visitors must implement the `PhpParser\NodeVisitor` interface, which defines the following four 354 visitors from visiting the current node, `NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN` can be u…
|
/PHP-Parser/ |
H A D | README.md | 198 * Node visitors 201 * Interleaved visitors
|
H A D | CHANGELOG.md | 175 * The `leaveNode()` method on visitors is now invoked in reverse order of `enterNode()`. 655 nodes, and prevent subsequent visitors from visiting the current node. 707 This should prevent common mistakes in the implementation of node visitors.
|
H A D | UPGRADE-5.0.md | 435 If there are multiple visitors, the node traverser will now call `leaveNode()` and `afterTraverse()…
|
/PHP-Parser/test/PhpParser/ |
H A D | NodeTraverserTest.php | 395 return $this->visitors;
|
Completed in 15 milliseconds