mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-20 19:45:21 +00:00
Fix IfExp location
This commit is contained in:
parent
c387b5d523
commit
c0f390ebc6
3 changed files with 4 additions and 4 deletions
|
@ -731,7 +731,7 @@ YieldExpr: ast::Expr = {
|
||||||
};
|
};
|
||||||
|
|
||||||
Test<Goal>: ast::Expr = {
|
Test<Goal>: ast::Expr = {
|
||||||
<body:OrTest<"all">> <location:@L> "if" <test:OrTest<"all">> "else" <orelse:Test<"all">> <end_location:@R> => ast::Expr {
|
<location:@L> <body:OrTest<"all">> "if" <test:OrTest<"all">> "else" <orelse:Test<"all">> <end_location:@R> => ast::Expr {
|
||||||
location,
|
location,
|
||||||
end_location: Some(end_location),
|
end_location: Some(end_location),
|
||||||
custom: (),
|
custom: (),
|
||||||
|
|
|
@ -18,7 +18,7 @@ Located {
|
||||||
elt: Located {
|
elt: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
column: 3,
|
column: 1,
|
||||||
},
|
},
|
||||||
end_location: Some(
|
end_location: Some(
|
||||||
Location {
|
Location {
|
||||||
|
|
|
@ -343,7 +343,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
context_expr: Located {
|
context_expr: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 5,
|
row: 5,
|
||||||
column: 7,
|
column: 5,
|
||||||
},
|
},
|
||||||
end_location: Some(
|
end_location: Some(
|
||||||
Location {
|
Location {
|
||||||
|
@ -452,7 +452,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||||
context_expr: Located {
|
context_expr: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 6,
|
row: 6,
|
||||||
column: 7,
|
column: 5,
|
||||||
},
|
},
|
||||||
end_location: Some(
|
end_location: Some(
|
||||||
Location {
|
Location {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue