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