mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
Merge pull request #4391 from harupy/fix-NamedExpr-location
Fix `NamedExpr` location
This commit is contained in:
4 files changed
+10
-10
No files matched your search
@@ -767,10 +767,10 @@ NamedExpressionTest: ast::Expr = {
|
||||
}
|
||||
|
||||
NamedExpression: ast::Expr = {
|
||||
<location:@L> <id:Identifier> ":=" <value:Test<"all">> <end_location:@R> => {
|
||||
<location:@L> <id:Identifier> <end_location:@R> ":=" <value:Test<"all">> => {
|
||||
ast::Expr {
|
||||
location,
|
||||
end_location: Some(end_location),
|
||||
end_location: value.end_location,
|
||||
custom: (),
|
||||
node: ast::ExprKind::NamedExpr {
|
||||
target: Box::new(ast::Expr::new(
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ expression: parse_ast
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 8,
|
||||
column: 4,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ Located {
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 11,
|
||||
column: 2,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
|
||||
+6
-6
@@ -1616,7 +1616,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 19,
|
||||
column: 12,
|
||||
column: 7,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
@@ -1704,7 +1704,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 20,
|
||||
column: 12,
|
||||
column: 7,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
@@ -1824,7 +1824,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 21,
|
||||
column: 12,
|
||||
column: 7,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
@@ -1875,7 +1875,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 21,
|
||||
column: 20,
|
||||
column: 15,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
@@ -1981,7 +1981,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 22,
|
||||
column: 12,
|
||||
column: 7,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
@@ -2032,7 +2032,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 22,
|
||||
column: 20,
|
||||
column: 15,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
|
||||
Reference in new issue
Block a user