Skip to content

Commit 371a55c

Browse files
committed
Make sure Error is aware of any CannotConsumeTokenException in SyntacticGrammar
1 parent d4feb16 commit 371a55c

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)