Skip to content

Commit c0f390e

Browse files
committed
Fix IfExp location
1 parent c387b5d commit c0f390e

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎parser/python.lalrpop‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ YieldExpr: ast::Expr = {
731731
};
732732

733733
Test<Goal>: ast::Expr = {
734-
<body:OrTest<"all">> <location:@L> "if" <test:OrTest<"all">> "else" <orelse:Test<"all">> <end_location:@R> => ast::Expr {
734+
<location:@L> <body:OrTest<"all">> "if" <test:OrTest<"all">> "else" <orelse:Test<"all">> <end_location:@R> => ast::Expr {
735735
location,
736736
end_location: Some(end_location),
737737
custom: (),

‎parser/src/snapshots/rustpython_parser__parser__tests__parse_if_else_generator_comprehension.snap‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Located {
1818
elt: Located {
1919
location: Location {
2020
row: 1,
21-
column: 3,
21+
column: 1,
2222
},
2323
end_location: Some(
2424
Location {

‎parser/src/snapshots/rustpython_parser__with__tests__with_statement.snap‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
343343
context_expr: Located {
344344
location: Location {
345345
row: 5,
346-
column: 7,
346+
column: 5,
347347
},
348348
end_location: Some(
349349
Location {
@@ -452,7 +452,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
452452
context_expr: Located {
453453
location: Location {
454454
row: 6,
455-
column: 7,
455+
column: 5,
456456
},
457457
end_location: Some(
458458
Location {

0 commit comments

Comments
 (0)