mirror of
https://github.com/python/cpython.git
synced 2026-01-06 07:22:09 +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
|
|
@ -94,10 +94,12 @@ func_type[mod_ty]: '(' a=[type_expressions] ')' '->' b=expression NEWLINE* ENDMA
|
|||
# GENERAL STATEMENTS
|
||||
# ==================
|
||||
|
||||
statements[asdl_stmt_seq*]: a=statement+ { _PyPegen_register_stmts(p, (asdl_stmt_seq*)_PyPegen_seq_flatten(p, a)) }
|
||||
statements[asdl_stmt_seq*]: a=statement+ { (asdl_stmt_seq*)_PyPegen_seq_flatten(p, a) }
|
||||
|
||||
statement[asdl_stmt_seq*]:
|
||||
| a=compound_stmt { (asdl_stmt_seq*)_PyPegen_singleton_seq(p, a) }
|
||||
| a=compound_stmt { _PyPegen_register_stmts(p ,
|
||||
(asdl_stmt_seq*)_PyPegen_singleton_seq(p, a)
|
||||
) }
|
||||
| a[asdl_stmt_seq*]=simple_stmts { a }
|
||||
|
||||
single_compound_stmt[asdl_stmt_seq*]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue