interface Parser
Same name in this branch
- 11.1.x vendor/phpunit/phpunit/src/Metadata/Parser/Parser.php \PHPUnit\Metadata\Parser\Parser
Hierarchy
- interface \PhpParser\Parser
Expanded class hierarchy of Parser
All classes that implement Parser
1 file declares its use of Parser
- ExcludeList.php in vendor/
phpunit/ phpunit/ src/ Util/ ExcludeList.php
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ Parser.php, line 5
Namespace
PhpParserView source
interface Parser {
/**
* Parses PHP code into a node tree.
*
* @param string $code The source code to parse
* @param ErrorHandler|null $errorHandler Error handler to use for lexer/parser errors, defaults
* to ErrorHandler\Throwing.
*
* @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and
* the parser was unable to recover from an error).
*/
public function parse(string $code, ?ErrorHandler $errorHandler = null) : ?array;
/**
* Return tokens for the last parse.
*
* @return Token[]
*/
public function getTokens() : array;
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
Parser::getTokens | public | function | Return tokens for the last parse. | 1 |
Parser::parse | public | function | Parses PHP code into a node tree. | 1 |