Skip to content

Commit bbeec36

Browse files
committed
Set comparator start location to beginning of comparison
1 parent a5b59f3 commit bbeec36

4 files changed

Lines changed: 5 additions & 5 deletions

‎parser/python.lalrpop‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ NotTest: ast::Expr = {
800800
};
801801

802802
Comparison: ast::Expr = {
803-
<left:Expression> <location:@L> <comparisons:(CompOp Expression)+> <end_location:@R> => {
803+
<location:@L> <left:Expression> <comparisons:(CompOp Expression)+> <end_location:@R> => {
804804
let (ops, comparators) = comparisons.into_iter().unzip();
805805
ast::Expr {
806806
location,

‎parser/src/snapshots/rustpython_parser__fstring__tests__parse_fstring_equals.snap‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ expression: parse_ast
1919
value: Located {
2020
location: Location {
2121
row: 1,
22-
column: 4,
22+
column: 1,
2323
},
2424
end_location: Some(
2525
Location {

‎parser/src/snapshots/rustpython_parser__fstring__tests__parse_fstring_not_equals.snap‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ expression: parse_ast
1919
value: Located {
2020
location: Location {
2121
row: 1,
22-
column: 3,
22+
column: 1,
2323
},
2424
end_location: Some(
2525
Location {

‎parser/src/snapshots/rustpython_parser__parser__tests__parse_double_list_comprehension.snap‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Located {
145145
Located {
146146
location: Location {
147147
row: 1,
148-
column: 34,
148+
column: 32,
149149
},
150150
end_location: Some(
151151
Location {
@@ -201,7 +201,7 @@ Located {
201201
Located {
202202
location: Location {
203203
row: 1,
204-
column: 43,
204+
column: 41,
205205
},
206206
end_location: Some(
207207
Location {

0 commit comments

Comments
 (0)