mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Update pegen to use the latest upstream developments (GH-27586)
This commit is contained in:
parent
8e832fb2a2
commit
953d27261e
26 changed files with 1243 additions and 673 deletions
|
@ -897,6 +897,19 @@ _PyPegen_expect_token(Parser *p, int type)
|
|||
return t;
|
||||
}
|
||||
|
||||
void*
|
||||
_PyPegen_expect_forced_result(Parser *p, void* result, const char* expected) {
|
||||
|
||||
if (p->error_indicator == 1) {
|
||||
return NULL;
|
||||
}
|
||||
if (result == NULL) {
|
||||
RAISE_SYNTAX_ERROR("expected (%s)", expected);
|
||||
return NULL;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Token *
|
||||
_PyPegen_expect_forced_token(Parser *p, int type, const char* expected) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue