mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
gh-137078: Fix keyword typo recognition when executed over files (#137079)
This commit is contained in:
parent
dc53a3e52a
commit
4e08a9f97a
6 changed files with 56 additions and 7 deletions
4
Parser/parser.c
generated
4
Parser/parser.c
generated
|
|
@ -1201,7 +1201,7 @@ statements_rule(Parser *p)
|
|||
)
|
||||
{
|
||||
D(fprintf(stderr, "%*c+ statements[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "statement+"));
|
||||
_res = _PyPegen_register_stmts ( p , ( asdl_stmt_seq* ) _PyPegen_seq_flatten ( p , a ) );
|
||||
_res = ( asdl_stmt_seq* ) _PyPegen_seq_flatten ( p , a );
|
||||
if (_res == NULL && PyErr_Occurred()) {
|
||||
p->error_indicator = 1;
|
||||
p->level--;
|
||||
|
|
@ -1244,7 +1244,7 @@ statement_rule(Parser *p)
|
|||
)
|
||||
{
|
||||
D(fprintf(stderr, "%*c+ statement[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "compound_stmt"));
|
||||
_res = ( asdl_stmt_seq* ) _PyPegen_singleton_seq ( p , a );
|
||||
_res = _PyPegen_register_stmts ( p , ( asdl_stmt_seq* ) _PyPegen_singleton_seq ( p , a ) );
|
||||
if (_res == NULL && PyErr_Occurred()) {
|
||||
p->error_indicator = 1;
|
||||
p->level--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue