mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-39579: Fix Attribute end_col_offset to point at the current node (GH-18405)
This commit is contained in:
parent
dc7a50d73a
commit
d2e1098641
3 changed files with 12 additions and 2 deletions
|
@ -1715,11 +1715,12 @@ ast_for_dotted_name(struct compiling *c, const node *n)
|
|||
return NULL;
|
||||
|
||||
for (i = 2; i < NCH(n); i+=2) {
|
||||
id = NEW_IDENTIFIER(CHILD(n, i));
|
||||
const node *child = CHILD(n, i);
|
||||
id = NEW_IDENTIFIER(child);
|
||||
if (!id)
|
||||
return NULL;
|
||||
e = Attribute(e, id, Load, lineno, col_offset,
|
||||
n->n_end_lineno, n->n_end_col_offset, c->c_arena);
|
||||
child->n_end_lineno, child->n_end_col_offset, c->c_arena);
|
||||
if (!e)
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue