bpo-40334: Set error_indicator in _PyPegen_raise_error (GH-19887)
Due to PyErr_Occurred not being called at the beginning of each rule, we need to set the error indicator, so that rules do not get expanded after an exception has been thrown
This commit is contained in:
parent
ad9eaeab74
commit
7f06af684a
|
@ -389,6 +389,7 @@ _PyPegen_raise_error(Parser *p, PyObject *errtype, int with_col_number, const ch
|
|||
Token *t = p->tokens[p->fill - 1];
|
||||
Py_ssize_t col_number = !with_col_number;
|
||||
va_list va;
|
||||
p->error_indicator = 1;
|
||||
|
||||
va_start(va, errmsg);
|
||||
errstr = PyUnicode_FromFormatV(errmsg, va);
|
||||
|
|
Loading…
Reference in New Issue