mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-11-27 12:35:05 +01:00
f99a96e0a2
Add ErrorHandler interface, as well as ErrorHandler\Throwing and ErrorHandler\Collecting. The error handler is passed to Parser::parse(). This supersedes the throwOnError option. NameResolver now accepts an ErrorHandler in the ctor.
13 lines
268 B
PHP
13 lines
268 B
PHP
<?php
|
|
|
|
namespace PhpParser;
|
|
|
|
interface ErrorHandler
|
|
{
|
|
/**
|
|
* Handle an error generated during lexing, parsing or some other operation.
|
|
*
|
|
* @param Error $error The error that needs to be handled
|
|
*/
|
|
public function handleError(Error $error);
|
|
} |