bpo-41746: Add type information to asdl_seq objects (GH-22223)
* Add new capability to the PEG parser to type variable assignments. For instance:
```
| a[asdl_stmt_seq*]=';'.small_stmt+ [';'] NEWLINE { a }
```
* Add new sequence types from the asdl definition (automatically generated)
* Make `asdl_seq` type a generic aliasing pointer type.
* Create a new `asdl_generic_seq` for the generic case using `void*`.
* The old `asdl_seq_GET`/`ast_seq_SET` macros now are typed.
* New `asdl_seq_GET_UNTYPED`/`ast_seq_SET_UNTYPED` macros for dealing with generic sequences.
* Changes all possible `asdl_seq` types to use specific versions everywhere.
diff --git a/Parser/pegen.c b/Parser/pegen.c
index 4beb2ab..1de495e 100644
--- a/Parser/pegen.c
+++ b/Parser/pegen.c
@@ -1243,7 +1243,7 @@
return result;
}
-void *
+asdl_stmt_seq*
_PyPegen_interactive_exit(Parser *p)
{
if (p->errcode) {
@@ -1257,11 +1257,11 @@
_PyPegen_singleton_seq(Parser *p, void *a)
{
assert(a != NULL);
- asdl_seq *seq = _Py_asdl_seq_new(1, p->arena);
+ asdl_seq *seq = (asdl_seq*)_Py_asdl_generic_seq_new(1, p->arena);
if (!seq) {
return NULL;
}
- asdl_seq_SET(seq, 0, a);
+ asdl_seq_SET_UNTYPED(seq, 0, a);
return seq;
}
@@ -1274,14 +1274,14 @@
return _PyPegen_singleton_seq(p, a);
}
- asdl_seq *new_seq = _Py_asdl_seq_new(asdl_seq_LEN(seq) + 1, p->arena);
+ asdl_seq *new_seq = (asdl_seq*)_Py_asdl_generic_seq_new(asdl_seq_LEN(seq) + 1, p->arena);
if (!new_seq) {
return NULL;
}
- asdl_seq_SET(new_seq, 0, a);
+ asdl_seq_SET_UNTYPED(new_seq, 0, a);
for (Py_ssize_t i = 1, l = asdl_seq_LEN(new_seq); i < l; i++) {
- asdl_seq_SET(new_seq, i, asdl_seq_GET(seq, i - 1));
+ asdl_seq_SET_UNTYPED(new_seq, i, asdl_seq_GET_UNTYPED(seq, i - 1));
}
return new_seq;
}
@@ -1295,15 +1295,15 @@
return _PyPegen_singleton_seq(p, a);
}
- asdl_seq *new_seq = _Py_asdl_seq_new(asdl_seq_LEN(seq) + 1, p->arena);
+ asdl_seq *new_seq = (asdl_seq*)_Py_asdl_generic_seq_new(asdl_seq_LEN(seq) + 1, p->arena);
if (!new_seq) {
return NULL;
}
for (Py_ssize_t i = 0, l = asdl_seq_LEN(new_seq); i + 1 < l; i++) {
- asdl_seq_SET(new_seq, i, asdl_seq_GET(seq, i));
+ asdl_seq_SET_UNTYPED(new_seq, i, asdl_seq_GET_UNTYPED(seq, i));
}
- asdl_seq_SET(new_seq, asdl_seq_LEN(new_seq) - 1, a);
+ asdl_seq_SET_UNTYPED(new_seq, asdl_seq_LEN(new_seq) - 1, a);
return new_seq;
}
@@ -1312,7 +1312,7 @@
{
Py_ssize_t size = 0;
for (Py_ssize_t i = 0, l = asdl_seq_LEN(seqs); i < l; i++) {
- asdl_seq *inner_seq = asdl_seq_GET(seqs, i);
+ asdl_seq *inner_seq = asdl_seq_GET_UNTYPED(seqs, i);
size += asdl_seq_LEN(inner_seq);
}
return size;
@@ -1325,16 +1325,16 @@
Py_ssize_t flattened_seq_size = _get_flattened_seq_size(seqs);
assert(flattened_seq_size > 0);
- asdl_seq *flattened_seq = _Py_asdl_seq_new(flattened_seq_size, p->arena);
+ asdl_seq *flattened_seq = (asdl_seq*)_Py_asdl_generic_seq_new(flattened_seq_size, p->arena);
if (!flattened_seq) {
return NULL;
}
int flattened_seq_idx = 0;
for (Py_ssize_t i = 0, l = asdl_seq_LEN(seqs); i < l; i++) {
- asdl_seq *inner_seq = asdl_seq_GET(seqs, i);
+ asdl_seq *inner_seq = asdl_seq_GET_UNTYPED(seqs, i);
for (Py_ssize_t j = 0, li = asdl_seq_LEN(inner_seq); j < li; j++) {
- asdl_seq_SET(flattened_seq, flattened_seq_idx++, asdl_seq_GET(inner_seq, j));
+ asdl_seq_SET_UNTYPED(flattened_seq, flattened_seq_idx++, asdl_seq_GET_UNTYPED(inner_seq, j));
}
}
assert(flattened_seq_idx == flattened_seq_size);
@@ -1403,7 +1403,7 @@
{
int number_of_dots = 0;
for (Py_ssize_t i = 0, l = asdl_seq_LEN(seq); i < l; i++) {
- Token *current_expr = asdl_seq_GET(seq, i);
+ Token *current_expr = asdl_seq_GET_UNTYPED(seq, i);
switch (current_expr->type) {
case ELLIPSIS:
number_of_dots += 3;
@@ -1435,13 +1435,13 @@
}
/* Creates a new asdl_seq* with the identifiers of all the names in seq */
-asdl_seq *
-_PyPegen_map_names_to_ids(Parser *p, asdl_seq *seq)
+asdl_identifier_seq *
+_PyPegen_map_names_to_ids(Parser *p, asdl_expr_seq *seq)
{
Py_ssize_t len = asdl_seq_LEN(seq);
assert(len > 0);
- asdl_seq *new_seq = _Py_asdl_seq_new(len, p->arena);
+ asdl_identifier_seq *new_seq = _Py_asdl_identifier_seq_new(len, p->arena);
if (!new_seq) {
return NULL;
}
@@ -1477,39 +1477,39 @@
return NULL;
}
for (Py_ssize_t i = 0; i < len; i++) {
- CmpopExprPair *pair = asdl_seq_GET(seq, i);
+ CmpopExprPair *pair = asdl_seq_GET_UNTYPED(seq, i);
asdl_seq_SET(new_seq, i, pair->cmpop);
}
return new_seq;
}
-asdl_seq *
+asdl_expr_seq *
_PyPegen_get_exprs(Parser *p, asdl_seq *seq)
{
Py_ssize_t len = asdl_seq_LEN(seq);
assert(len > 0);
- asdl_seq *new_seq = _Py_asdl_seq_new(len, p->arena);
+ asdl_expr_seq *new_seq = _Py_asdl_expr_seq_new(len, p->arena);
if (!new_seq) {
return NULL;
}
for (Py_ssize_t i = 0; i < len; i++) {
- CmpopExprPair *pair = asdl_seq_GET(seq, i);
+ CmpopExprPair *pair = asdl_seq_GET_UNTYPED(seq, i);
asdl_seq_SET(new_seq, i, pair->expr);
}
return new_seq;
}
/* Creates an asdl_seq* where all the elements have been changed to have ctx as context */
-static asdl_seq *
-_set_seq_context(Parser *p, asdl_seq *seq, expr_context_ty ctx)
+static asdl_expr_seq *
+_set_seq_context(Parser *p, asdl_expr_seq *seq, expr_context_ty ctx)
{
Py_ssize_t len = asdl_seq_LEN(seq);
if (len == 0) {
return NULL;
}
- asdl_seq *new_seq = _Py_asdl_seq_new(len, p->arena);
+ asdl_expr_seq *new_seq = _Py_asdl_expr_seq_new(len, p->arena);
if (!new_seq) {
return NULL;
}
@@ -1529,13 +1529,19 @@
static expr_ty
_set_tuple_context(Parser *p, expr_ty e, expr_context_ty ctx)
{
- return _Py_Tuple(_set_seq_context(p, e->v.Tuple.elts, ctx), ctx, EXTRA_EXPR(e, e));
+ return _Py_Tuple(
+ _set_seq_context(p, e->v.Tuple.elts, ctx),
+ ctx,
+ EXTRA_EXPR(e, e));
}
static expr_ty
_set_list_context(Parser *p, expr_ty e, expr_context_ty ctx)
{
- return _Py_List(_set_seq_context(p, e->v.List.elts, ctx), ctx, EXTRA_EXPR(e, e));
+ return _Py_List(
+ _set_seq_context(p, e->v.List.elts, ctx),
+ ctx,
+ EXTRA_EXPR(e, e));
}
static expr_ty
@@ -1602,32 +1608,32 @@
}
/* Extracts all keys from an asdl_seq* of KeyValuePair*'s */
-asdl_seq *
+asdl_expr_seq *
_PyPegen_get_keys(Parser *p, asdl_seq *seq)
{
Py_ssize_t len = asdl_seq_LEN(seq);
- asdl_seq *new_seq = _Py_asdl_seq_new(len, p->arena);
+ asdl_expr_seq *new_seq = _Py_asdl_expr_seq_new(len, p->arena);
if (!new_seq) {
return NULL;
}
for (Py_ssize_t i = 0; i < len; i++) {
- KeyValuePair *pair = asdl_seq_GET(seq, i);
+ KeyValuePair *pair = asdl_seq_GET_UNTYPED(seq, i);
asdl_seq_SET(new_seq, i, pair->key);
}
return new_seq;
}
/* Extracts all values from an asdl_seq* of KeyValuePair*'s */
-asdl_seq *
+asdl_expr_seq *
_PyPegen_get_values(Parser *p, asdl_seq *seq)
{
Py_ssize_t len = asdl_seq_LEN(seq);
- asdl_seq *new_seq = _Py_asdl_seq_new(len, p->arena);
+ asdl_expr_seq *new_seq = _Py_asdl_expr_seq_new(len, p->arena);
if (!new_seq) {
return NULL;
}
for (Py_ssize_t i = 0; i < len; i++) {
- KeyValuePair *pair = asdl_seq_GET(seq, i);
+ KeyValuePair *pair = asdl_seq_GET_UNTYPED(seq, i);
asdl_seq_SET(new_seq, i, pair->value);
}
return new_seq;
@@ -1648,7 +1654,7 @@
/* Constructs a SlashWithDefault */
SlashWithDefault *
-_PyPegen_slash_with_default(Parser *p, asdl_seq *plain_names, asdl_seq *names_with_defaults)
+_PyPegen_slash_with_default(Parser *p, asdl_arg_seq *plain_names, asdl_seq *names_with_defaults)
{
SlashWithDefault *a = PyArena_Malloc(p->arena, sizeof(SlashWithDefault));
if (!a) {
@@ -1678,47 +1684,47 @@
{
Py_ssize_t first_len = asdl_seq_LEN(a);
Py_ssize_t second_len = asdl_seq_LEN(b);
- asdl_seq *new_seq = _Py_asdl_seq_new(first_len + second_len, p->arena);
+ asdl_seq *new_seq = (asdl_seq*)_Py_asdl_generic_seq_new(first_len + second_len, p->arena);
if (!new_seq) {
return NULL;
}
int k = 0;
for (Py_ssize_t i = 0; i < first_len; i++) {
- asdl_seq_SET(new_seq, k++, asdl_seq_GET(a, i));
+ asdl_seq_SET_UNTYPED(new_seq, k++, asdl_seq_GET_UNTYPED(a, i));
}
for (Py_ssize_t i = 0; i < second_len; i++) {
- asdl_seq_SET(new_seq, k++, asdl_seq_GET(b, i));
+ asdl_seq_SET_UNTYPED(new_seq, k++, asdl_seq_GET_UNTYPED(b, i));
}
return new_seq;
}
-static asdl_seq *
+static asdl_arg_seq*
_get_names(Parser *p, asdl_seq *names_with_defaults)
{
Py_ssize_t len = asdl_seq_LEN(names_with_defaults);
- asdl_seq *seq = _Py_asdl_seq_new(len, p->arena);
+ asdl_arg_seq *seq = _Py_asdl_arg_seq_new(len, p->arena);
if (!seq) {
return NULL;
}
for (Py_ssize_t i = 0; i < len; i++) {
- NameDefaultPair *pair = asdl_seq_GET(names_with_defaults, i);
+ NameDefaultPair *pair = asdl_seq_GET_UNTYPED(names_with_defaults, i);
asdl_seq_SET(seq, i, pair->arg);
}
return seq;
}
-static asdl_seq *
+static asdl_expr_seq *
_get_defaults(Parser *p, asdl_seq *names_with_defaults)
{
Py_ssize_t len = asdl_seq_LEN(names_with_defaults);
- asdl_seq *seq = _Py_asdl_seq_new(len, p->arena);
+ asdl_expr_seq *seq = _Py_asdl_expr_seq_new(len, p->arena);
if (!seq) {
return NULL;
}
for (Py_ssize_t i = 0; i < len; i++) {
- NameDefaultPair *pair = asdl_seq_GET(names_with_defaults, i);
+ NameDefaultPair *pair = asdl_seq_GET_UNTYPED(names_with_defaults, i);
asdl_seq_SET(seq, i, pair->value);
}
return seq;
@@ -1726,39 +1732,45 @@
/* Constructs an arguments_ty object out of all the parsed constructs in the parameters rule */
arguments_ty
-_PyPegen_make_arguments(Parser *p, asdl_seq *slash_without_default,
- SlashWithDefault *slash_with_default, asdl_seq *plain_names,
+_PyPegen_make_arguments(Parser *p, asdl_arg_seq *slash_without_default,
+ SlashWithDefault *slash_with_default, asdl_arg_seq *plain_names,
asdl_seq *names_with_default, StarEtc *star_etc)
{
- asdl_seq *posonlyargs;
+ asdl_arg_seq *posonlyargs;
if (slash_without_default != NULL) {
posonlyargs = slash_without_default;
}
else if (slash_with_default != NULL) {
- asdl_seq *slash_with_default_names =
+ asdl_arg_seq *slash_with_default_names =
_get_names(p, slash_with_default->names_with_defaults);
if (!slash_with_default_names) {
return NULL;
}
- posonlyargs = _PyPegen_join_sequences(p, slash_with_default->plain_names, slash_with_default_names);
+ posonlyargs = (asdl_arg_seq*)_PyPegen_join_sequences(
+ p,
+ (asdl_seq*)slash_with_default->plain_names,
+ (asdl_seq*)slash_with_default_names);
if (!posonlyargs) {
return NULL;
}
}
else {
- posonlyargs = _Py_asdl_seq_new(0, p->arena);
+ posonlyargs = _Py_asdl_arg_seq_new(0, p->arena);
if (!posonlyargs) {
return NULL;
}
}
- asdl_seq *posargs;
+ asdl_arg_seq *posargs;
if (plain_names != NULL && names_with_default != NULL) {
- asdl_seq *names_with_default_names = _get_names(p, names_with_default);
+ asdl_arg_seq *names_with_default_names = _get_names(p, names_with_default);
if (!names_with_default_names) {
return NULL;
}
- posargs = _PyPegen_join_sequences(p, plain_names, names_with_default_names);
+ posargs = (asdl_arg_seq*)_PyPegen_join_sequences(
+ p,
+ (asdl_seq*)plain_names,
+ (asdl_seq*)names_with_default_names);
if (!posargs) {
return NULL;
}
@@ -1773,24 +1785,27 @@
posargs = plain_names;
}
else {
- posargs = _Py_asdl_seq_new(0, p->arena);
+ posargs = _Py_asdl_arg_seq_new(0, p->arena);
if (!posargs) {
return NULL;
}
}
- asdl_seq *posdefaults;
+ asdl_expr_seq *posdefaults;
if (slash_with_default != NULL && names_with_default != NULL) {
- asdl_seq *slash_with_default_values =
+ asdl_expr_seq *slash_with_default_values =
_get_defaults(p, slash_with_default->names_with_defaults);
if (!slash_with_default_values) {
return NULL;
}
- asdl_seq *names_with_default_values = _get_defaults(p, names_with_default);
+ asdl_expr_seq *names_with_default_values = _get_defaults(p, names_with_default);
if (!names_with_default_values) {
return NULL;
}
- posdefaults = _PyPegen_join_sequences(p, slash_with_default_values, names_with_default_values);
+ posdefaults = (asdl_expr_seq*)_PyPegen_join_sequences(
+ p,
+ (asdl_seq*)slash_with_default_values,
+ (asdl_seq*)names_with_default_values);
if (!posdefaults) {
return NULL;
}
@@ -1808,7 +1823,7 @@
}
}
else {
- posdefaults = _Py_asdl_seq_new(0, p->arena);
+ posdefaults = _Py_asdl_expr_seq_new(0, p->arena);
if (!posdefaults) {
return NULL;
}
@@ -1819,7 +1834,7 @@
vararg = star_etc->vararg;
}
- asdl_seq *kwonlyargs;
+ asdl_arg_seq *kwonlyargs;
if (star_etc != NULL && star_etc->kwonlyargs != NULL) {
kwonlyargs = _get_names(p, star_etc->kwonlyargs);
if (!kwonlyargs) {
@@ -1827,13 +1842,13 @@
}
}
else {
- kwonlyargs = _Py_asdl_seq_new(0, p->arena);
+ kwonlyargs = _Py_asdl_arg_seq_new(0, p->arena);
if (!kwonlyargs) {
return NULL;
}
}
- asdl_seq *kwdefaults;
+ asdl_expr_seq *kwdefaults;
if (star_etc != NULL && star_etc->kwonlyargs != NULL) {
kwdefaults = _get_defaults(p, star_etc->kwonlyargs);
if (!kwdefaults) {
@@ -1841,7 +1856,7 @@
}
}
else {
- kwdefaults = _Py_asdl_seq_new(0, p->arena);
+ kwdefaults = _Py_asdl_expr_seq_new(0, p->arena);
if (!kwdefaults) {
return NULL;
}
@@ -1861,23 +1876,23 @@
arguments_ty
_PyPegen_empty_arguments(Parser *p)
{
- asdl_seq *posonlyargs = _Py_asdl_seq_new(0, p->arena);
+ asdl_arg_seq *posonlyargs = _Py_asdl_arg_seq_new(0, p->arena);
if (!posonlyargs) {
return NULL;
}
- asdl_seq *posargs = _Py_asdl_seq_new(0, p->arena);
+ asdl_arg_seq *posargs = _Py_asdl_arg_seq_new(0, p->arena);
if (!posargs) {
return NULL;
}
- asdl_seq *posdefaults = _Py_asdl_seq_new(0, p->arena);
+ asdl_expr_seq *posdefaults = _Py_asdl_expr_seq_new(0, p->arena);
if (!posdefaults) {
return NULL;
}
- asdl_seq *kwonlyargs = _Py_asdl_seq_new(0, p->arena);
+ asdl_arg_seq *kwonlyargs = _Py_asdl_arg_seq_new(0, p->arena);
if (!kwonlyargs) {
return NULL;
}
- asdl_seq *kwdefaults = _Py_asdl_seq_new(0, p->arena);
+ asdl_expr_seq *kwdefaults = _Py_asdl_expr_seq_new(0, p->arena);
if (!kwdefaults) {
return NULL;
}
@@ -1900,7 +1915,7 @@
/* Construct a FunctionDef equivalent to function_def, but with decorators */
stmt_ty
-_PyPegen_function_def_decorators(Parser *p, asdl_seq *decorators, stmt_ty function_def)
+_PyPegen_function_def_decorators(Parser *p, asdl_expr_seq *decorators, stmt_ty function_def)
{
assert(function_def != NULL);
if (function_def->kind == AsyncFunctionDef_kind) {
@@ -1922,7 +1937,7 @@
/* Construct a ClassDef equivalent to class_def, but with decorators */
stmt_ty
-_PyPegen_class_def_decorators(Parser *p, asdl_seq *decorators, stmt_ty class_def)
+_PyPegen_class_def_decorators(Parser *p, asdl_expr_seq *decorators, stmt_ty class_def)
{
assert(class_def != NULL);
return _Py_ClassDef(class_def->v.ClassDef.name, class_def->v.ClassDef.bases,
@@ -1950,7 +1965,7 @@
{
int n = 0;
for (Py_ssize_t i = 0, l = asdl_seq_LEN(seq); i < l; i++) {
- KeywordOrStarred *k = asdl_seq_GET(seq, i);
+ KeywordOrStarred *k = asdl_seq_GET_UNTYPED(seq, i);
if (!k->is_keyword) {
n++;
}
@@ -1959,21 +1974,21 @@
}
/* Extract the starred expressions of an asdl_seq* of KeywordOrStarred*s */
-asdl_seq *
+asdl_expr_seq *
_PyPegen_seq_extract_starred_exprs(Parser *p, asdl_seq *kwargs)
{
int new_len = _seq_number_of_starred_exprs(kwargs);
if (new_len == 0) {
return NULL;
}
- asdl_seq *new_seq = _Py_asdl_seq_new(new_len, p->arena);
+ asdl_expr_seq *new_seq = _Py_asdl_expr_seq_new(new_len, p->arena);
if (!new_seq) {
return NULL;
}
int idx = 0;
for (Py_ssize_t i = 0, len = asdl_seq_LEN(kwargs); i < len; i++) {
- KeywordOrStarred *k = asdl_seq_GET(kwargs, i);
+ KeywordOrStarred *k = asdl_seq_GET_UNTYPED(kwargs, i);
if (!k->is_keyword) {
asdl_seq_SET(new_seq, idx++, k->element);
}
@@ -1982,7 +1997,7 @@
}
/* Return a new asdl_seq* with only the keywords in kwargs */
-asdl_seq *
+asdl_keyword_seq*
_PyPegen_seq_delete_starred_exprs(Parser *p, asdl_seq *kwargs)
{
Py_ssize_t len = asdl_seq_LEN(kwargs);
@@ -1990,14 +2005,14 @@
if (new_len == 0) {
return NULL;
}
- asdl_seq *new_seq = _Py_asdl_seq_new(new_len, p->arena);
+ asdl_keyword_seq *new_seq = _Py_asdl_keyword_seq_new(new_len, p->arena);
if (!new_seq) {
return NULL;
}
int idx = 0;
for (Py_ssize_t i = 0; i < len; i++) {
- KeywordOrStarred *k = asdl_seq_GET(kwargs, i);
+ KeywordOrStarred *k = asdl_seq_GET_UNTYPED(kwargs, i);
if (k->is_keyword) {
asdl_seq_SET(new_seq, idx++, k->element);
}
@@ -2011,8 +2026,8 @@
Py_ssize_t len = asdl_seq_LEN(strings);
assert(len > 0);
- Token *first = asdl_seq_GET(strings, 0);
- Token *last = asdl_seq_GET(strings, len - 1);
+ Token *first = asdl_seq_GET_UNTYPED(strings, 0);
+ Token *last = asdl_seq_GET_UNTYPED(strings, len - 1);
int bytesmode = 0;
PyObject *bytes_str = NULL;
@@ -2021,7 +2036,7 @@
_PyPegen_FstringParser_Init(&state);
for (Py_ssize_t i = 0; i < len; i++) {
- Token *t = asdl_seq_GET(strings, i);
+ Token *t = asdl_seq_GET_UNTYPED(strings, i);
int this_bytesmode;
int this_rawmode;
@@ -2095,12 +2110,12 @@
}
mod_ty
-_PyPegen_make_module(Parser *p, asdl_seq *a) {
- asdl_seq *type_ignores = NULL;
+_PyPegen_make_module(Parser *p, asdl_stmt_seq *a) {
+ asdl_type_ignore_seq *type_ignores = NULL;
Py_ssize_t num = p->type_ignore_comments.num_items;
if (num > 0) {
// Turn the raw (comment, lineno) pairs into TypeIgnore objects in the arena
- type_ignores = _Py_asdl_seq_new(num, p->arena);
+ type_ignores = _Py_asdl_type_ignore_seq_new(num, p->arena);
if (type_ignores == NULL) {
return NULL;
}
@@ -2219,7 +2234,7 @@
}
-expr_ty _PyPegen_collect_call_seqs(Parser *p, asdl_seq *a, asdl_seq *b,
+expr_ty _PyPegen_collect_call_seqs(Parser *p, asdl_expr_seq *a, asdl_seq *b,
int lineno, int col_offset, int end_lineno,
int end_col_offset, PyArena *arena) {
Py_ssize_t args_len = asdl_seq_LEN(a);
@@ -2231,14 +2246,14 @@
}
- asdl_seq *starreds = _PyPegen_seq_extract_starred_exprs(p, b);
- asdl_seq *keywords = _PyPegen_seq_delete_starred_exprs(p, b);
+ asdl_expr_seq *starreds = _PyPegen_seq_extract_starred_exprs(p, b);
+ asdl_keyword_seq *keywords = _PyPegen_seq_delete_starred_exprs(p, b);
if (starreds) {
total_len += asdl_seq_LEN(starreds);
}
- asdl_seq *args = _Py_asdl_seq_new(total_len, arena);
+ asdl_expr_seq *args = _Py_asdl_expr_seq_new(total_len, arena);
Py_ssize_t i = 0;
for (i = 0; i < args_len; i++) {
@@ -2250,6 +2265,4 @@
return _Py_Call(_PyPegen_dummy_name(p), args, keywords, lineno,
col_offset, end_lineno, end_col_offset, arena);
-
-
}