php-parser/lib/PhpParser/ParserInterface.php
Nikita Popov ca3b44bf60 Fork separate PHP 7 parser
Also add ParserInterface
2015-06-13 13:09:34 +02:00

25 lines
637 B
PHP

<?php
namespace PhpParser;
interface ParserInterface {
/**
* Parses PHP code into a node tree.
*
* @param string $code The source code to parse
*
* @return Node[]|null Array of statements (or null if the 'throwOnError' option is disabled and the parser was
* unable to recover from an error).
*/
public function parse($code);
/**
* Get array of errors that occurred during the last parse.
*
* This method may only return multiple errors if the 'throwOnError' option is disabled.
*
* @return Error[]
*/
public function getErrors();
}