diff --git a/lib/PhpParser/Lexer.php b/lib/PhpParser/Lexer.php index eb350c7..182bfd5 100644 --- a/lib/PhpParser/Lexer.php +++ b/lib/PhpParser/Lexer.php @@ -32,10 +32,14 @@ class Lexer * @throws Error on lexing errors (unterminated comment or unexpected character) */ public function startLexing($code) { + $scream = ini_set('xdebug.scream', 0); + $this->resetErrors(); $this->tokens = @token_get_all($code); $this->handleErrors(); + ini_set('xdebug.scream', $scream); + $this->code = $code; // keep the code around for __halt_compiler() handling $this->pos = -1; $this->line = 1;