Home
last modified time | relevance | path

Searched refs:ParserFactory (Results 1 – 23 of 23) sorted by relevance

/PHP-Parser/
H A DUPGRADE-2.0.md11 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 DUPGRADE-5.0.md30 * 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 DREADME.md43 use PhpParser\ParserFactory;
54 $parser = (new ParserFactory())->createForNewestSupportedVersion();
H A DUPGRADE-3.0.md46 $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 DCHANGELOG.md115 * Removed `ParserFactory::create()`.
244 * Added `PhpVersion` class, which is accepted in a number of places (e.g. ParserFactory, Parser,
1215 * Added `PhpParser\ParserFactory` class, which should be used to create parser instances.
/PHP-Parser/test/PhpParser/NodeVisitor/
H A DParentConnectingVisitorTest.php8 use PhpParser\ParserFactory; alias
12 $ast = (new ParserFactory())->createForNewestSupportedVersion()->parse(
H A DNodeConnectingVisitorTest.php10 use PhpParser\ParserFactory; alias
14 $ast = (new ParserFactory())->createForNewestSupportedVersion()->parse(
/PHP-Parser/test/PhpParser/Node/Scalar/
H A DDNumberTest.php7 use PhpParser\ParserFactory; alias
11 $parser = (new ParserFactory())->createForNewestSupportedVersion();
H A DNumberTest.php6 use PhpParser\ParserFactory; alias
10 $parser = (new ParserFactory())->createForNewestSupportedVersion();
H A DStringTest.php6 use PhpParser\ParserFactory; alias
10 $parser = (new ParserFactory())->createForNewestSupportedVersion();
/PHP-Parser/doc/component/
H A DFAQ.markdown15 use PhpParser\ParserFactory;
21 $parser = (new ParserFactory())->createForHostVersion();
37 use PhpParser\ParserFactory;
43 $parser = (new ParserFactory())->createForHostVersion();
H A DJSON_representation.markdown10 use PhpParser\ParserFactory;
21 $parser = (new ParserFactory())->createForHostVersion();
H A DError_handling.markdown42 $parser = (new PhpParser\ParserFactory())->createForHostVersion();
H A DPretty_printing.markdown80 use PhpParser\{NodeTraverser, NodeVisitor, ParserFactory, PrettyPrinter};
82 $parser = (new ParserFactory())->createForHostVersion();
H A DLexer.markdown5 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 DParserFactoryTest.php13 $factory = new ParserFactory();
H A DNodeDumperTest.php61 $parser = (new ParserFactory())->createForHostVersion();
H A DCodeParsingTest.php22 $factory = new ParserFactory();
H A DPrettyPrinterTest.php21 $factory = new ParserFactory();
/PHP-Parser/lib/PhpParser/
H A DParserFactory.php8 class ParserFactory { class
/PHP-Parser/doc/
H A D2_Usage_of_basic_components.markdown31 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 Dphp-parse29 $parser = (new PhpParser\ParserFactory())->createForVersion($attributes['version']);
/PHP-Parser/test_old/
H A Drun.php142 $parser = (new PhpParser\ParserFactory())->createForVersion(PhpParser\PhpVersion::fromString($phpVe…

Completed in 35 milliseconds