mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-01-16 14:48:32 +01:00
parent
eb036d5a09
commit
d619c8b4e6
@ -519,7 +519,7 @@ $newStmts = $traverser->traverse($oldStmts);
|
|||||||
|
|
||||||
$parser = (new ParserFactory())->createForNewestSupportedVersion();
|
$parser = (new ParserFactory())->createForNewestSupportedVersion();
|
||||||
$oldStmts = $parser->parse($code);
|
$oldStmts = $parser->parse($code);
|
||||||
$oldTokens = $lexer->getTokens();
|
$oldTokens = $parser->getTokens();
|
||||||
|
|
||||||
$traverser = new NodeTraverser(new NodeVisitor\CloningVisitor());
|
$traverser = new NodeTraverser(new NodeVisitor\CloningVisitor());
|
||||||
$newStmts = $traverser->traverse($oldStmts);
|
$newStmts = $traverser->traverse($oldStmts);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user