gh-112388: Fix an error that was causing the parser to try to overwrite tokenizer errors (#112410)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
This commit is contained in:
committed by
GitHub
parent
967f2a3052
commit
2c8b191742
@@ -219,6 +219,10 @@ exit:
|
||||
void *
|
||||
_PyPegen_raise_error(Parser *p, PyObject *errtype, int use_mark, const char *errmsg, ...)
|
||||
{
|
||||
// Bail out if we already have an error set.
|
||||
if (p->error_indicator && PyErr_Occurred()) {
|
||||
return NULL;
|
||||
}
|
||||
if (p->fill == 0) {
|
||||
va_list va;
|
||||
va_start(va, errmsg);
|
||||
|
||||
Reference in New Issue
Block a user