mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
bpo-44257: fix "assigment_expr" typo + regenerate the grammar, and remove unused imports (GH-29393)
Co-authored-by: Wim Glenn <wglenn@jumptrading.com>
This commit is contained in:
parent
7b438282d3
commit
762173c670
3 changed files with 64 additions and 66 deletions
|
@ -642,11 +642,11 @@ star_named_expression[expr_ty]:
|
|||
| '*' a=bitwise_or { _PyAST_Starred(a, Load, EXTRA) }
|
||||
| named_expression
|
||||
|
||||
assigment_expression[expr_ty]:
|
||||
assignment_expression[expr_ty]:
|
||||
| a=NAME ':=' ~ b=expression { _PyAST_NamedExpr(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), b, EXTRA) }
|
||||
|
||||
named_expression[expr_ty]:
|
||||
| assigment_expression
|
||||
| assignment_expression
|
||||
| invalid_named_expression
|
||||
| expression !':='
|
||||
|
||||
|
@ -903,7 +903,7 @@ setcomp[expr_ty]:
|
|||
| invalid_comprehension
|
||||
|
||||
genexp[expr_ty]:
|
||||
| '(' a=( assigment_expression | expression !':=') b=for_if_clauses ')' { _PyAST_GeneratorExp(a, b, EXTRA) }
|
||||
| '(' a=( assignment_expression | expression !':=') b=for_if_clauses ')' { _PyAST_GeneratorExp(a, b, EXTRA) }
|
||||
| invalid_comprehension
|
||||
|
||||
dictcomp[expr_ty]:
|
||||
|
@ -918,7 +918,7 @@ arguments[expr_ty] (memo):
|
|||
| invalid_arguments
|
||||
|
||||
args[expr_ty]:
|
||||
| a[asdl_expr_seq*]=','.(starred_expression | ( assigment_expression | expression !':=') !'=')+ b=[',' k=kwargs {k}] {
|
||||
| a[asdl_expr_seq*]=','.(starred_expression | ( assignment_expression | expression !':=') !'=')+ b=[',' k=kwargs {k}] {
|
||||
_PyPegen_collect_call_seqs(p, a, b, EXTRA) }
|
||||
| a=kwargs { _PyAST_Call(_PyPegen_dummy_name(p),
|
||||
CHECK_NULL_ALLOWED(asdl_expr_seq*, _PyPegen_seq_extract_starred_exprs(p, a)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue