Home
last modified time | relevance | path

Searched refs:ErrorHandler (Results 1 – 21 of 21) sorted by relevance

/PHP-Parser/lib/PhpParser/ErrorHandler/
H A DThrowing.php3 namespace PhpParser\ErrorHandler;
6 use PhpParser\ErrorHandler; alias
13 class Throwing implements ErrorHandler {
H A DCollecting.php3 namespace PhpParser\ErrorHandler;
6 use PhpParser\ErrorHandler; alias
13 class Collecting implements ErrorHandler {
/PHP-Parser/lib/PhpParser/
H A DParser.php10 * @param ErrorHandler|null $errorHandler Error handler to use for lexer/parser errors, defaults
16 public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array;
H A DLexer.php20 * @param ErrorHandler|null $errorHandler Error handler to use for lexing errors. Defaults to
24 public function tokenize(string $code, ?ErrorHandler $errorHandler = null): array {
26 $errorHandler = new ErrorHandler\Throwing();
41 private function handleInvalidCharacter(Token $token, ErrorHandler $errorHandler): void {
69 protected function postprocessTokens(array &$tokens, ErrorHandler $errorHandler): void {
H A DErrorHandler.php5 interface ErrorHandler { interface
H A DNameContext.php19 /** @var ErrorHandler Error handler */
20 protected ErrorHandler $errorHandler;
25 * @param ErrorHandler $errorHandler Error handling used to report errors
27 public function __construct(ErrorHandler $errorHandler) {
H A DParserAbstract.php125 /** @var ErrorHandler Error handler */
126 protected ErrorHandler $errorHandler;
174 * @param ErrorHandler|null $errorHandler Error handler to use for lexer/parser errors, defaults
180 public function parse(string $code, ?ErrorHandler $errorHandler = null): ?array {
181 $this->errorHandler = $errorHandler ?: new ErrorHandler\Throwing();
/PHP-Parser/doc/component/
H A DError_handling.markdown34 The error behavior of the parser (and other components) is controlled by an `ErrorHandler`. Wheneve…
35 encountered, `ErrorHandler::handleError()` is invoked. The default error handling strategy is `Erro…
39 an instance of `ErrorHandler\Collecting` can be passed to the `Parser::parse()` method. A usage exa…
43 $errorHandler = new PhpParser\ErrorHandler\Collecting;
60 The `NameResolver` visitor also accepts an `ErrorHandler` as a constructor argument.
H A DName_resolution.markdown66 public function __construct(ErrorHandler $errorHandler);
/PHP-Parser/test/PhpParser/ErrorHandler/
H A DThrowingTest.php3 namespace PhpParser\ErrorHandler;
H A DCollectingTest.php3 namespace PhpParser\ErrorHandler;
/PHP-Parser/lib/PhpParser/Lexer/
H A DEmulative.php6 use PhpParser\ErrorHandler; alias
64 public function tokenize(string $code, ?ErrorHandler $errorHandler = null): array {
75 $errorHandler = new ErrorHandler\Throwing();
83 $collector = new ErrorHandler\Collecting();
/PHP-Parser/
H A DUPGRADE-3.0.md59 Instead an instance of `ErrorHandler\Collecting` should be passed to the `parse()` method:
65 $errorHandler = new ErrorHandler\Collecting;
92 $errors7 = new ErrorHandler\Collecting();
95 $errors5 = new ErrorHandler\Collecting();
109 to optionally accept an `ErrorHandler`:
115 public function startLexing($code, ErrorHandler $errorHandler = null);
139 * `Parser::getErrors()`. Use `ErrorHandler\Collecting` instead.
143 * `throwOnError` parser option. Use `ErrorHandler\Collecting` instead.
H A DCHANGELOG.md992 * Added `ErrorHandler` interface, and `ErrorHandler\Throwing` and `ErrorHandler\Collecting` as
994 * Added optional `ErrorHandler` argument to `Parser::parse()`, `Lexer::startLexing()` and
1020 * Removed `throw_on_error` parser option and `Parser::getErrors()` method. Use the `ErrorHandler`
/PHP-Parser/lib/PhpParser/NodeVisitor/
H A DNameResolver.php5 use PhpParser\ErrorHandler; alias
34 * @param ErrorHandler|null $errorHandler Error handler
37 public function __construct(?ErrorHandler $errorHandler = null, array $options = []) {
38 $this->nameContext = new NameContext($errorHandler ?? new ErrorHandler\Throwing());
/PHP-Parser/test/PhpParser/
H A DNameContextTest.php13 $nameContext = new NameContext(new ErrorHandler\Throwing());
H A DLexerTest.php21 $errorHandler = new ErrorHandler\Collecting();
H A DCodeParsingTest.php33 $errors = new ErrorHandler\Collecting();
H A DParserTestAbstract.php208 public function tokenize(string $code, ?ErrorHandler $errorHandler = null): array {
/PHP-Parser/test/PhpParser/Lexer/
H A DEmulativeTest.php5 use PhpParser\ErrorHandler; alias
160 $errorHandler = new ErrorHandler\Collecting();
/PHP-Parser/bin/
H A Dphp-parse57 $errorHandler = new PhpParser\ErrorHandler\Collecting;

Completed in 22 milliseconds