mirror of
https://github.com/python/cpython.git
synced 2025-08-22 01:35:16 +00:00
bpo-40141: Add line and column information to ast.keyword nodes (GH-19283)
This commit is contained in:
parent
65a796e527
commit
168660b547
6 changed files with 117 additions and 8 deletions
|
@ -3013,7 +3013,8 @@ ast_for_call(struct compiling *c, const node *n, expr_ty func,
|
|||
e = ast_for_expr(c, CHILD(ch, 1));
|
||||
if (!e)
|
||||
return NULL;
|
||||
kw = keyword(NULL, e, c->c_arena);
|
||||
kw = keyword(NULL, e, chch->n_lineno, chch->n_col_offset,
|
||||
e->end_lineno, e->end_col_offset, c->c_arena);
|
||||
asdl_seq_SET(keywords, nkeywords++, kw);
|
||||
ndoublestars++;
|
||||
}
|
||||
|
@ -3103,7 +3104,9 @@ ast_for_call(struct compiling *c, const node *n, expr_ty func,
|
|||
e = ast_for_expr(c, CHILD(ch, 2));
|
||||
if (!e)
|
||||
return NULL;
|
||||
kw = keyword(key, e, c->c_arena);
|
||||
kw = keyword(key, e, chch->n_lineno, chch->n_col_offset,
|
||||
chch->n_end_lineno, chch->n_end_col_offset, c->c_arena);
|
||||
|
||||
if (!kw)
|
||||
return NULL;
|
||||
asdl_seq_SET(keywords, nkeywords++, kw);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue