/PHP-Parser/lib/PhpParser/ |
H A D | NodeTraverser.php | 9 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 D | NodeTraverserInterface.php | 9 * @param NodeVisitor $visitor Visitor to add 11 public function addVisitor(NodeVisitor $visitor): void; 16 public function removeVisitor(NodeVisitor $visitor): void;
|
H A D | NodeFinder.php | 5 use PhpParser\NodeVisitor\FindingVisitor; 6 use PhpParser\NodeVisitor\FirstFindingVisitor;
|
H A D | NodeVisitorAbstract.php | 8 abstract class NodeVisitorAbstract implements NodeVisitor {
|
H A D | NodeVisitor.php | 5 interface NodeVisitor { interface
|
/PHP-Parser/lib/PhpParser/NodeVisitor/ |
H A D | FirstFindingVisitor.php | 3 namespace PhpParser\NodeVisitor; 6 use PhpParser\NodeVisitor; alias 44 return NodeVisitor::STOP_TRAVERSAL;
|
H A D | CloningVisitor.php | 3 namespace PhpParser\NodeVisitor;
|
H A D | FindingVisitor.php | 3 namespace PhpParser\NodeVisitor;
|
H A D | ParentConnectingVisitor.php | 3 namespace PhpParser\NodeVisitor;
|
H A D | NodeConnectingVisitor.php | 3 namespace PhpParser\NodeVisitor;
|
H A D | CommentAnnotatingVisitor.php | 3 namespace PhpParser\NodeVisitor;
|
/PHP-Parser/test/PhpParser/ |
H A D | NodeTraverserTest.php | 83 ['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 D | NodeVisitorForTesting.php | 5 class NodeVisitorForTesting implements NodeVisitor {
|
/PHP-Parser/ |
H A D | phpstan-baseline.neon | 136 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 D | CONTRIBUTING.md | 31 `NodeVisitor\NameResolver`. Test it in `NodeVisitor\NameResolverTest`.
|
/PHP-Parser/test/PhpParser/NodeVisitor/ |
H A D | ParentConnectingVisitorTest.php | 3 namespace PhpParser\NodeVisitor;
|
H A D | NodeConnectingVisitorTest.php | 3 namespace PhpParser\NodeVisitor;
|
H A D | FirstFindingVisitorTest.php | 3 namespace PhpParser\NodeVisitor;
|
H A D | FindingVisitorTest.php | 3 namespace PhpParser\NodeVisitor;
|
/PHP-Parser/doc/component/ |
H A D | FAQ.markdown | 14 use PhpParser\NodeVisitor\ParentConnectingVisitor; 36 use PhpParser\NodeVisitor\NodeConnectingVisitor;
|
H A D | Walking_the_AST.markdown | 42 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 D | Name_resolution.markdown | 17 $nameResolver = new PhpParser\NodeVisitor\NameResolver; 41 $nameResolver = new PhpParser\NodeVisitor\NameResolver(null, [
|
/PHP-Parser/tools/fuzzing/ |
H A D | target.php | 8 use PhpParser\NodeVisitor; alias 53 return NodeVisitor::REMOVE_NODE;
|
/PHP-Parser/doc/ |
H A D | 2_Usage_of_basic_components.markdown | 329 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 D | php-parse | 37 $traverser->addVisitor(new PhpParser\NodeVisitor\NameResolver);
|