Version 1
[yaffs-website] / vendor / nikic / php-parser / lib / PhpParser / Parser.php
1 <?php
2
3 namespace PhpParser;
4
5 interface Parser {
6     /**
7      * Parses PHP code into a node tree.
8      *
9      * @param string $code The source code to parse
10      * @param ErrorHandler|null $errorHandler Error handler to use for lexer/parser errors, defaults
11      *                                        to ErrorHandler\Throwing.
12      *
13      * @return Node[]|null Array of statements (or null if the 'throwOnError' option is disabled and the parser was
14      *                     unable to recover from an error).
15      */
16     public function parse($code, ErrorHandler $errorHandler = null);
17 }