summaryrefslogtreecommitdiffstats
path: root/Python/ast.c
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2020-04-01 23:47:39 (GMT)
committerGitHub <noreply@github.com>2020-04-01 23:47:39 (GMT)
commit168660b547d5f683c5d3c60447cfa8c6d620efc3 (patch)
treee57909715a435ccb1699af5670b3a3319636317e /Python/ast.c
parent65a796e5272f61b42792d3a8c69686558c1872c5 (diff)
downloadcpython-168660b547d5f683c5d3c60447cfa8c6d620efc3.zip
cpython-168660b547d5f683c5d3c60447cfa8c6d620efc3.tar.gz
cpython-168660b547d5f683c5d3c60447cfa8c6d620efc3.tar.bz2
bpo-40141: Add line and column information to ast.keyword nodes (GH-19283)
Diffstat (limited to 'Python/ast.c')
-rw-r--r--Python/ast.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Python/ast.c b/Python/ast.c
index fb23c02..550ee03 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -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);