mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Merge pull request #4459 from andersk/elif-location
Fix end location for elif blocks
This commit is contained in:
2 files changed
+3
-3
No files matched your search
@@ -372,7 +372,7 @@ IfStatement: ast::Stmt = {
|
||||
let x = ast::Stmt {
|
||||
custom: (),
|
||||
location: i.0,
|
||||
end_location: i.4.last().unwrap().end_location,
|
||||
end_location,
|
||||
node: ast::StmtKind::If { test: Box::new(i.2), body: i.4, orelse: last },
|
||||
};
|
||||
last = vec![x];
|
||||
|
||||
+2
-2
@@ -79,8 +79,8 @@ expression: parse_ast
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 2,
|
||||
column: 10,
|
||||
row: 3,
|
||||
column: 8,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
|
||||
Reference in new issue
Block a user