Lines Matching refs:ParserFactory
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);
51 `Parser\Multiple`. Parser tokens are now defined in `Parser\Tokens`. If you use the `ParserFactory`