Searched refs:ParserFactory (Results 1 – 23 of 23) sorted by relevance
/PHP-Parser/ |
H A D | UPGRADE-2.0.md | 11 Parser instances should now be created through the `ParserFactory`. Old direct instantiation code 24 use PhpParser\ParserFactory; 25 $parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7); 28 The first argument to `ParserFactory` determines how different PHP versions are handled. The 31 …* `ParserFactory::PREFER_PHP7`: Try to parse code as PHP 7. If this fails, try to parse it as PHP … 32 …* `ParserFactory::PREFER_PHP5`: Try to parse code as PHP 5. If this fails, try to parse it as PHP … 33 * `ParserFactory::ONLY_PHP7`: Parse code as PHP 7. 34 * `ParserFactory::ONLY_PHP5`: Parse code as PHP 5. 43 use PhpParser\ParserFactory; 45 $parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7, $lexer); [all …]
|
H A D | UPGRADE-5.0.md | 30 * The `PhpParser\ParserFactory::ONLY_PHP5` and `PREFER_PHP5` options have been removed. 34 The `ParserFactory::create()` method has been removed in favor of three new methods that provide mo… 47 use PhpParser\ParserFactory; 50 $factory = new ParserFactory(); 53 $parser = $factory->create(ParserFactory::PREFER_PHP7); 61 $parser = $factory->create(ParserFactory::ONLY_PHP5); 497 …e a need to directly interact with the `Lexer` for end users, as the `ParserFactory` will create a… 520 $parser = (new ParserFactory())->createForNewestSupportedVersion();
|
H A D | README.md | 43 use PhpParser\ParserFactory; 54 $parser = (new ParserFactory())->createForNewestSupportedVersion();
|
H A D | UPGRADE-3.0.md | 46 $parser = (new ParserFactory)->create(ParserFactor::ONLY_PHP7, $lexer, [ 63 $parser = (new ParserFactory)->create(ParserFactor::ONLY_PHP7, $lexer); 75 As a result of this change, if a `Multiple` parser is used (e.g. through the `ParserFactory` using
|
H A D | CHANGELOG.md | 122 * Removed `ParserFactory::create()`. 251 * Added `PhpVersion` class, which is accepted in a number of places (e.g. ParserFactory, Parser, 1222 * Added `PhpParser\ParserFactory` class, which should be used to create parser instances.
|
/PHP-Parser/test/PhpParser/NodeVisitor/ |
H A D | ParentConnectingVisitorTest.php | 8 use PhpParser\ParserFactory; alias 12 $ast = (new ParserFactory())->createForNewestSupportedVersion()->parse(
|
H A D | NodeConnectingVisitorTest.php | 10 use PhpParser\ParserFactory; alias 14 $ast = (new ParserFactory())->createForNewestSupportedVersion()->parse(
|
/PHP-Parser/test/PhpParser/Node/Scalar/ |
H A D | DNumberTest.php | 7 use PhpParser\ParserFactory; alias 11 $parser = (new ParserFactory())->createForNewestSupportedVersion();
|
H A D | NumberTest.php | 6 use PhpParser\ParserFactory; alias 10 $parser = (new ParserFactory())->createForNewestSupportedVersion();
|
H A D | StringTest.php | 6 use PhpParser\ParserFactory; alias 10 $parser = (new ParserFactory())->createForNewestSupportedVersion();
|
/PHP-Parser/doc/component/ |
H A D | FAQ.markdown | 15 use PhpParser\ParserFactory; 21 $parser = (new ParserFactory())->createForHostVersion(); 37 use PhpParser\ParserFactory; 43 $parser = (new ParserFactory())->createForHostVersion();
|
H A D | JSON_representation.markdown | 10 use PhpParser\ParserFactory; 21 $parser = (new ParserFactory())->createForHostVersion();
|
H A D | Error_handling.markdown | 42 $parser = (new PhpParser\ParserFactory())->createForHostVersion();
|
H A D | Pretty_printing.markdown | 80 use PhpParser\{NodeTraverser, NodeVisitor, ParserFactory, PrettyPrinter}; 82 $parser = (new ParserFactory())->createForHostVersion();
|
H A D | Lexer.markdown | 5 interaction with the lexer, as an appropriate lexer is created by `PhpParser\ParserFactory`. The to… 114 $parser = (new PhpParser\ParserFactory())->createForHostVersion($lexerOptions);
|
/PHP-Parser/test/PhpParser/ |
H A D | ParserFactoryTest.php | 13 $factory = new ParserFactory();
|
H A D | NodeDumperTest.php | 61 $parser = (new ParserFactory())->createForHostVersion();
|
H A D | CodeParsingTest.php | 22 $factory = new ParserFactory();
|
H A D | PrettyPrinterTest.php | 21 $factory = new ParserFactory();
|
/PHP-Parser/lib/PhpParser/ |
H A D | ParserFactory.php | 8 class ParserFactory { class
|
/PHP-Parser/doc/ |
H A D | 2_Usage_of_basic_components.markdown | 31 use PhpParser\ParserFactory; 35 $parser = (new ParserFactory())->createForHostVersion(); 38 $parser = (new ParserFactory())->createForNewestSupportedVersion(); 59 use PhpParser\ParserFactory; 69 $parser = (new ParserFactory())->createForHostVersion(); 225 use PhpParser\ParserFactory; 230 $parser = (new ParserFactory())->createForHostVersion(); 284 use PhpParser\ParserFactory; 287 $parser = (new ParserFactory())->createForHostVersion(); 406 use PhpParser\ParserFactory; [all …]
|
/PHP-Parser/bin/ |
H A D | php-parse | 29 $parser = (new PhpParser\ParserFactory())->createForVersion($attributes['version']);
|
/PHP-Parser/test_old/ |
H A D | run.php | 142 $parser = (new PhpParser\ParserFactory())->createForVersion(PhpParser\PhpVersion::fromString($phpVe…
|
Completed in 25 milliseconds