菜谱项目

Parser.php 592B

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