Home
last modified time | relevance | path

Searched refs:NodeVisitor (Results 1 – 25 of 33) sorted by relevance

12

/PHP-Parser/lib/PhpParser/
H A DNodeTraverser.php9 public const DONT_TRAVERSE_CHILDREN = NodeVisitor::DONT_TRAVERSE_CHILDREN;
14 public const STOP_TRAVERSAL = NodeVisitor::STOP_TRAVERSAL;
19 public const REMOVE_NODE = NodeVisitor::REMOVE_NODE;
35 * @param NodeVisitor ...$visitors Node visitors
37 public function __construct(NodeVisitor ...$visitors) {
44 * @param NodeVisitor $visitor Visitor to add
46 public function addVisitor(NodeVisitor $visitor): void {
53 public function removeVisitor(NodeVisitor $visitor): void {
117 } elseif (NodeVisitor::STOP_TRAVERSAL === $return) {
192 } elseif (NodeVisitor::REMOVE_NODE === $return) {
[all …]
H A DNodeTraverserInterface.php9 * @param NodeVisitor $visitor Visitor to add
11 public function addVisitor(NodeVisitor $visitor): void;
16 public function removeVisitor(NodeVisitor $visitor): void;
H A DNodeFinder.php5 use PhpParser\NodeVisitor\FindingVisitor;
6 use PhpParser\NodeVisitor\FirstFindingVisitor;
H A DNodeVisitorAbstract.php8 abstract class NodeVisitorAbstract implements NodeVisitor {
H A DNodeVisitor.php5 interface NodeVisitor { interface
/PHP-Parser/lib/PhpParser/NodeVisitor/
H A DFirstFindingVisitor.php3 namespace PhpParser\NodeVisitor;
6 use PhpParser\NodeVisitor; alias
44 return NodeVisitor::STOP_TRAVERSAL;
H A DCloningVisitor.php3 namespace PhpParser\NodeVisitor;
H A DFindingVisitor.php3 namespace PhpParser\NodeVisitor;
H A DParentConnectingVisitor.php3 namespace PhpParser\NodeVisitor;
H A DNodeConnectingVisitor.php3 namespace PhpParser\NodeVisitor;
H A DCommentAnnotatingVisitor.php3 namespace PhpParser\NodeVisitor;
/PHP-Parser/test/PhpParser/
H A DNodeTraverserTest.php83 ['leaveNode', $str1Node, NodeVisitor::REMOVE_NODE],
107 ['enterNode', $str1Node, NodeVisitor::REMOVE_NODE],
267 ['enterNode', $mulNode, NodeVisitor::STOP_TRAVERSAL],
280 ['enterNode', $varNode1, NodeVisitor::STOP_TRAVERSAL],
294 ['leaveNode', $varNode1, NodeVisitor::STOP_TRAVERSAL],
309 ['leaveNode', $mulNode, NodeVisitor::STOP_TRAVERSAL],
327 ['leaveNode', $mulNode, NodeVisitor::REMOVE_NODE],
354 ['enterNode', $else1, NodeVisitor::REPLACE_WITH_NULL],
355 ['leaveNode', $else2, NodeVisitor::REPLACE_WITH_NULL],
457 ['enterNode', $expr, NodeVisitor::REPLACE_WITH_NULL],
[all …]
H A DNodeVisitorForTesting.php5 class NodeVisitorForTesting implements NodeVisitor {
/PHP-Parser/
H A Dphpstan-baseline.neon136 path: lib/PhpParser/NodeVisitor/NameResolver.php
141 path: lib/PhpParser/NodeVisitor/NameResolver.php
146 path: lib/PhpParser/NodeVisitor/NameResolver.php
149 …message: "#^Method PhpParser\\\\NodeVisitor\\\\NodeConnectingVisitor\\:\\:beforeTraverse\\(\\) sho…
151 path: lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php
156 path: lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php
161 path: lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php
164 …message: "#^Method PhpParser\\\\NodeVisitor\\\\ParentConnectingVisitor\\:\\:beforeTraverse\\(\\) s…
166 path: lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php
171 path: lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php
[all …]
H A DCONTRIBUTING.md31 `NodeVisitor\NameResolver`. Test it in `NodeVisitor\NameResolverTest`.
/PHP-Parser/test/PhpParser/NodeVisitor/
H A DParentConnectingVisitorTest.php3 namespace PhpParser\NodeVisitor;
H A DNodeConnectingVisitorTest.php3 namespace PhpParser\NodeVisitor;
H A DFirstFindingVisitorTest.php3 namespace PhpParser\NodeVisitor;
H A DFindingVisitorTest.php3 namespace PhpParser\NodeVisitor;
/PHP-Parser/doc/component/
H A DFAQ.markdown14 use PhpParser\NodeVisitor\ParentConnectingVisitor;
36 use PhpParser\NodeVisitor\NodeConnectingVisitor;
H A DWalking_the_AST.markdown42 interface NodeVisitor {
149 return NodeVisitor::REMOVE_NODE;
169 return NodeVisitor::REMOVE_NODE;
184 return NodeVisitor::REPLACE_WITH_NULL;
225 return NodeVisitor::DONT_TRAVERSE_CHILDREN;
245 return NodeVisitor::STOP_TRAVERSAL;
H A DName_resolution.markdown17 $nameResolver = new PhpParser\NodeVisitor\NameResolver;
41 $nameResolver = new PhpParser\NodeVisitor\NameResolver(null, [
/PHP-Parser/tools/fuzzing/
H A Dtarget.php8 use PhpParser\NodeVisitor; alias
53 return NodeVisitor::REMOVE_NODE;
/PHP-Parser/doc/
H A D2_Usage_of_basic_components.markdown329 All visitors must implement the `PhpParser\NodeVisitor` interface, which defines the following four
352 The `enterNode()` method can additionally return the value `NodeVisitor::DONT_TRAVERSE_CHILDREN`,
354 visitors from visiting the current node, `NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN` can be u…
358 * `NodeVisitor::STOP_TRAVERSAL`, in which case no further nodes will be visited.
359 * `NodeVisitor::REMOVE_NODE`, in which case the current node will be removed from the parent array.
360 * `NodeVisitor::REPLACE_WITH_NULL`, in which case the current node will be replaced with `null`.
365 Instead of manually implementing the `NodeVisitor` interface you can also extend the `NodeVisitorAb…
373 One visitor that is already bundled with the package is `PhpParser\NodeVisitor\NameResolver`. This …
409 use PhpParser\NodeVisitor\NameResolver;
505 use PhpParser\NodeVisitor;
[all …]
/PHP-Parser/bin/
H A Dphp-parse37 $traverser->addVisitor(new PhpParser\NodeVisitor\NameResolver);

Completed in 20 milliseconds

12