mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-104656: Rename typeparams AST node to type_params (#104657)
This commit is contained in:
parent
ef5d00a592
commit
a5f244d627
14 changed files with 290 additions and 287 deletions
|
@ -640,12 +640,12 @@ type_alias[stmt_ty]:
|
|||
# Type parameter declaration
|
||||
# --------------------------
|
||||
|
||||
type_params[asdl_typeparam_seq*]: '[' t=type_param_seq ']' {
|
||||
CHECK_VERSION(asdl_typeparam_seq *, 12, "Type parameter lists are", t) }
|
||||
type_params[asdl_type_param_seq*]: '[' t=type_param_seq ']' {
|
||||
CHECK_VERSION(asdl_type_param_seq *, 12, "Type parameter lists are", t) }
|
||||
|
||||
type_param_seq[asdl_typeparam_seq*]: a[asdl_typeparam_seq*]=','.type_param+ [','] { a }
|
||||
type_param_seq[asdl_type_param_seq*]: a[asdl_type_param_seq*]=','.type_param+ [','] { a }
|
||||
|
||||
type_param[typeparam_ty] (memo):
|
||||
type_param[type_param_ty] (memo):
|
||||
| a=NAME b=[type_param_bound] { _PyAST_TypeVar(a->v.Name.id, b, EXTRA) }
|
||||
| '*' a=NAME colon=":" e=expression {
|
||||
RAISE_SYNTAX_ERROR_STARTING_FROM(colon, e->kind == Tuple_kind
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue