Home
last modified time | relevance | path

Searched refs:visitors (Results 1 – 9 of 9) sorted by relevance

/PHP-Parser/lib/PhpParser/
H A DNodeTraverser.php27 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 DWalking_the_AST.markdown4 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 DREADME.md14 * Node visitors
17 * Interleaved visitors
H A D0_Introduction.markdown92 * Infrastructure for traversing and changing the AST (node traverser and node visitors).
H A D2_Usage_of_basic_components.markdown329 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 DREADME.md198 * Node visitors
201 * Interleaved visitors
H A DCHANGELOG.md175 * 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 DUPGRADE-5.0.md435 If there are multiple visitors, the node traverser will now call `leaveNode()` and `afterTraverse()…
/PHP-Parser/test/PhpParser/
H A DNodeTraverserTest.php395 return $this->visitors;

Completed in 22 milliseconds