Searched refs:ErrorHandler (Results 1 – 21 of 21) sorted by relevance
/PHP-Parser/lib/PhpParser/ErrorHandler/ |
H A D | Throwing.php | 3 namespace PhpParser\ErrorHandler; 6 use PhpParser\ErrorHandler; alias 13 class Throwing implements ErrorHandler {
|
H A D | Collecting.php | 3 namespace PhpParser\ErrorHandler; 6 use PhpParser\ErrorHandler; alias 13 class Collecting implements ErrorHandler {
|
/PHP-Parser/lib/PhpParser/ |
H A D | Parser.php | 10 * @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 D | Lexer.php | 20 * @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 D | ErrorHandler.php | 5 interface ErrorHandler { interface
|
H A D | NameContext.php | 19 /** @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 D | ParserAbstract.php | 125 /** @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 D | Error_handling.markdown | 34 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 D | Name_resolution.markdown | 66 public function __construct(ErrorHandler $errorHandler);
|
/PHP-Parser/test/PhpParser/ErrorHandler/ |
H A D | ThrowingTest.php | 3 namespace PhpParser\ErrorHandler;
|
H A D | CollectingTest.php | 3 namespace PhpParser\ErrorHandler;
|
/PHP-Parser/lib/PhpParser/Lexer/ |
H A D | Emulative.php | 6 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 D | UPGRADE-3.0.md | 59 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 D | CHANGELOG.md | 992 * 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 D | NameResolver.php | 5 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 D | NameContextTest.php | 13 $nameContext = new NameContext(new ErrorHandler\Throwing());
|
H A D | LexerTest.php | 21 $errorHandler = new ErrorHandler\Collecting();
|
H A D | CodeParsingTest.php | 33 $errors = new ErrorHandler\Collecting();
|
H A D | ParserTestAbstract.php | 208 public function tokenize(string $code, ?ErrorHandler $errorHandler = null): array {
|
/PHP-Parser/test/PhpParser/Lexer/ |
H A D | EmulativeTest.php | 5 use PhpParser\ErrorHandler; alias 160 $errorHandler = new ErrorHandler\Collecting();
|
/PHP-Parser/bin/ |
H A D | php-parse | 57 $errorHandler = new PhpParser\ErrorHandler\Collecting;
|
Completed in 22 milliseconds