mirror of
https://github.com/python/cpython.git
synced 2026-01-08 08:22:41 +00:00
Fix elif start column offset when there is an else following (GH-17596)
This commit is contained in:
parent
95826c773a
commit
5936a4ce91
2 changed files with 11 additions and 2 deletions
|
|
@ -4050,8 +4050,8 @@ ast_for_if_stmt(struct compiling *c, const node *n)
|
|||
|
||||
asdl_seq_SET(orelse, 0,
|
||||
If(expression, suite_seq, suite_seq2,
|
||||
LINENO(CHILD(n, NCH(n) - 6)),
|
||||
CHILD(n, NCH(n) - 6)->n_col_offset,
|
||||
LINENO(CHILD(n, NCH(n) - 7)),
|
||||
CHILD(n, NCH(n) - 7)->n_col_offset,
|
||||
end_lineno, end_col_offset, c->c_arena));
|
||||
/* the just-created orelse handled the last elif */
|
||||
n_elif--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue