Skip to content

Commit d1811c7

Browse files
authored
Merge pull request RustPython#4354 from harupy/fix-IfExp-locations
Fix `IfExp` location
2 parents 38a8007 + 1589072 commit d1811c7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

compiler/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: (),

compiler/parser/src/snapshots/rustpython_parser__parser__tests__parse_if_else_generator_comprehension.snap

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

compiler/parser/src/snapshots/rustpython_parser__with__tests__with_statement.snap

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)