Skip to content

Commit d270bd4

Browse files
committed
Pass every CannotConsumeTokenException to Error
1 parent d4feb16 commit d270bd4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/GrammarProcessing/SyntacticGrammar.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ public function parseLexicalTokens(TokenStream $tokenStream, string $rootSymbol)
3636
);
3737

3838
$tokenStream->consumeEndOfStream();
39-
} catch (CannotConsumeTokenException) {
39+
} catch (CannotConsumeTokenException $e) {
40+
$error->setError($e);
4041
$error->throw();
4142
}
4243

0 commit comments

Comments
 (0)