summaryrefslogtreecommitdiffstats
path: root/Parser/pegen.c
diff options
context:
space:
mode:
Diffstat (limited to 'Parser/pegen.c')
-rw-r--r--Parser/pegen.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Parser/pegen.c b/Parser/pegen.c
index e32b271..6080cec 100644
--- a/Parser/pegen.c
+++ b/Parser/pegen.c
@@ -1283,6 +1283,9 @@ _PyPegen_run_parser(Parser *p)
reset_parser_state(p);
_PyPegen_parse(p);
if (PyErr_Occurred()) {
+ if (PyErr_ExceptionMatches(PyExc_SyntaxError)) {
+ _PyPegen_check_tokenizer_errors(p);
+ }
return NULL;
}
if (p->fill == 0) {