mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-01-17 15:18:17 +01:00
Adjust test_old to use new Lexer injection method
This commit is contained in:
parent
f66a672dd0
commit
c3cf3f29bd
@ -31,7 +31,7 @@ if ('Symfony' === $TEST_TYPE) {
|
|||||||
require_once dirname(__FILE__) . '/../lib/PHPParser/Autoloader.php';
|
require_once dirname(__FILE__) . '/../lib/PHPParser/Autoloader.php';
|
||||||
PHPParser_Autoloader::register();
|
PHPParser_Autoloader::register();
|
||||||
|
|
||||||
$parser = new PHPParser_Parser;
|
$parser = new PHPParser_Parser(new PHPParser_Lexer_Emulative);
|
||||||
$prettyPrinter = new PHPParser_PrettyPrinter_Zend;
|
$prettyPrinter = new PHPParser_PrettyPrinter_Zend;
|
||||||
$nodeDumper = new PHPParser_NodeDumper;
|
$nodeDumper = new PHPParser_NodeDumper;
|
||||||
|
|
||||||
@ -87,7 +87,7 @@ foreach (new RecursiveIteratorIterator(
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$startTime = microtime(true);
|
$startTime = microtime(true);
|
||||||
$stmts = $parser->parse(new PHPParser_Lexer_Emulative($code));
|
$stmts = $parser->parse($code);
|
||||||
$parseTime += microtime(true) - $startTime;
|
$parseTime += microtime(true) - $startTime;
|
||||||
|
|
||||||
$startTime = microtime(true);
|
$startTime = microtime(true);
|
||||||
@ -96,7 +96,7 @@ foreach (new RecursiveIteratorIterator(
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
$startTime = microtime(true);
|
$startTime = microtime(true);
|
||||||
$ppStmts = $parser->parse(new PHPParser_Lexer_Emulative($code));
|
$ppStmts = $parser->parse($code);
|
||||||
$reparseTime += microtime(true) - $startTime;
|
$reparseTime += microtime(true) - $startTime;
|
||||||
|
|
||||||
$startTime = microtime(true);
|
$startTime = microtime(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user