Home
last modified time | relevance | path

Searched refs:traverser (Results 1 – 21 of 21) sorted by relevance

/PHP-Parser/test/PhpParser/
H A DNodeTraverserTest.php19 $traverser = new NodeTraverser();
20 $traverser->addVisitor($visitor);
87 $traverser = new NodeTraverser();
88 $traverser->addVisitor($visitor2);
89 $traverser->addVisitor($visitor);
111 $traverser = new NodeTraverser();
112 $traverser->addVisitor($visitor);
136 $traverser = new NodeTraverser();
137 $traverser->addVisitor($visitor);
161 $traverser = new NodeTraverser();
[all …]
H A DCodeParsingTest.php70 $traverser = new NodeTraverser(new class () extends NodeVisitorAbstract {
99 $traverser->traverse($stmts);
H A DPrettyPrinterTest.php193 $traverser = new NodeTraverser(new NodeVisitor\CloningVisitor());
198 $newStmts = $traverser->traverse($oldStmts);
231 $traverser = new NodeTraverser(new NodeVisitor\CloningVisitor());
242 $newStmts = $traverser->traverse($oldStmts);
/PHP-Parser/test/PhpParser/NodeVisitor/
H A DNameResolverTest.php358 $traverser = new PhpParser\NodeTraverser();
359 $traverser->addVisitor(new NameResolver());
377 $traverser = new PhpParser\NodeTraverser();
378 $traverser->addVisitor(new NameResolver());
413 $stmts = $traverser->traverse($stmts);
431 $traverser->traverse([$stmt]);
490 $stmts = $traverser->traverse($stmts);
519 $stmts = $traverser->traverse($stmts);
541 $stmts = $traverser->traverse($origStmts);
560 $traverser->traverse($origStmts);
[all …]
H A DFirstFindingVisitorTest.php11 $traverser = new NodeTraverser();
15 $traverser->addVisitor($visitor);
20 $traverser->traverse($stmts);
25 $traverser = new NodeTraverser();
29 $traverser->addVisitor($visitor);
34 $traverser->traverse($stmts);
H A DFindingVisitorTest.php11 $traverser = new NodeTraverser();
15 $traverser->addVisitor($visitor);
22 $traverser->traverse($stmts);
31 $traverser = new NodeTraverser();
35 $traverser->addVisitor($visitor);
42 $traverser->traverse($stmts);
H A DParentConnectingVisitorTest.php16 $traverser = new NodeTraverser();
18 $traverser->addVisitor(new ParentConnectingVisitor());
20 $ast = $traverser->traverse($ast);
H A DNodeConnectingVisitorTest.php18 $traverser = new NodeTraverser();
20 $traverser->addVisitor(new NodeConnectingVisitor());
22 $ast = $traverser->traverse($ast);
/PHP-Parser/lib/PhpParser/
H A DNodeFinder.php28 $traverser = new NodeTraverser($visitor);
29 $traverser->traverse($nodes);
69 $traverser = new NodeTraverser($visitor);
70 $traverser->traverse($nodes);
H A DParserAbstract.php208 $traverser = new NodeTraverser(new CommentAnnotatingVisitor($this->tokens));
209 $traverser->traverse($result);
/PHP-Parser/tools/fuzzing/
H A Dtarget.php100 $traverser = new PhpParser\NodeTraverser(); variable
101 $traverser->addVisitor($visitor);
103 …t(function(string $input) use($lexer, $parser, $prettyPrinter, $nodeDumper, $visitor, $traverser) {
108 $stmts = $traverser->traverse($stmts);
120 $printedStmts = $traverser->traverse($printedStmts);
/PHP-Parser/doc/component/
H A DFAQ.markdown19 $traverser = new NodeTraverser(new ParentConnectingVisitor);
23 $ast = $traverser->traverse($ast);
41 $traverser = new NodeTraverser(new NodeConnectingVisitor);
45 $ast = $traverser->traverse($ast);
H A DWalking_the_AST.markdown11 $traverser = new NodeTraverser;
21 $modifiedStmts = $traverser->traverse($stmts);
30 $traverser = new NodeTraverser();
31 $traverser->addVisitor($visitor1);
32 $traverser->addVisitor($visitor2);
33 $traverser->addVisitor($visitor3);
259 $traverser = new NodeTraverser;
260 $traverser->addVisitor($visitorA);
261 $traverser->addVisitor($visitorB);
262 $stmts = $traverser->traverse($stmts);
[all …]
H A DPretty_printing.markdown87 $traverser = new NodeTraverser(new NodeVisitor\CloningVisitor());
88 $newStmts = $traverser->traverse($oldStmts);
H A DLexer.markdown117 $traverser = new PhpParser\NodeTraverser($visitor);
122 $stmts = $traverser->traverse($stmts);
/PHP-Parser/bin/
H A Dphp-parse36 $traverser = new PhpParser\NodeTraverser(); variable
37 $traverser->addVisitor(new PhpParser\NodeVisitor\NameResolver);
91 $stmts = $traverser->traverse($stmts);
/PHP-Parser/
H A DREADME.md123 $traverser = new NodeTraverser();
124 $traverser->addVisitor(new class extends NodeVisitorAbstract {
133 $ast = $traverser->traverse($ast);
H A DUPGRADE-5.0.md433 ### Changes to the node traverser
435 If there are multiple visitors, the node traverser will now call `leaveNode()` and `afterTraverse()…
464 $traverser = new NodeTraverser();
465 $traverser->addVisitor(new NameResolver());
468 $traverser = new NodeTraverser(new NameResolver());
514 $traverser = new NodeTraverser();
515 $traverser->addVisitor(new NodeVisitor\CloningVisitor());
516 $newStmts = $traverser->traverse($oldStmts);
524 $traverser = new NodeTraverser(new NodeVisitor\CloningVisitor());
525 $newStmts = $traverser->traverse($oldStmts);
H A DCHANGELOG.md706 * Added checks to node traverser to prevent replacing a statement with an expression or vice versa.
/PHP-Parser/doc/
H A D2_Usage_of_basic_components.markdown4 This document explains how to use the parser, the pretty printer and the node traverser.
288 $traverser = new NodeTraverser;
292 $traverser->addVisitor(new MyNodeVisitor);
301 $stmts = $traverser->traverse($stmts);
340 traverser was called with. This method can be used for resetting values before traversal or
353 which instructs the traverser to skip all children of the current node. To furthermore prevent subs…
415 $traverser = new NodeTraverser;
418 $traverser->addVisitor(new NameResolver); // we will need resolved names
419 $traverser->addVisitor(new NamespaceConverter); // our own node visitor
434 $stmts = $traverser->traverse($stmts);
H A D0_Introduction.markdown92 * Infrastructure for traversing and changing the AST (node traverser and node visitors).

Completed in 45 milliseconds