mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-13 16:15:16 +00:00
Set comparator start location to beginning of comparison
This commit is contained in:
parent
1dfa2e5239
commit
ac1821b23d
4 changed files with 5 additions and 5 deletions
|
@ -800,7 +800,7 @@ NotTest: ast::Expr = {
|
||||||
};
|
};
|
||||||
|
|
||||||
Comparison: ast::Expr = {
|
Comparison: ast::Expr = {
|
||||||
<left:Expression> <location:@L> <comparisons:(CompOp Expression)+> <end_location:@R> => {
|
<location:@L> <left:Expression> <comparisons:(CompOp Expression)+> <end_location:@R> => {
|
||||||
let (ops, comparators) = comparisons.into_iter().unzip();
|
let (ops, comparators) = comparisons.into_iter().unzip();
|
||||||
ast::Expr {
|
ast::Expr {
|
||||||
location,
|
location,
|
||||||
|
|
|
@ -19,7 +19,7 @@ expression: parse_ast
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
column: 4,
|
column: 1,
|
||||||
},
|
},
|
||||||
end_location: Some(
|
end_location: Some(
|
||||||
Location {
|
Location {
|
||||||
|
|
|
@ -19,7 +19,7 @@ expression: parse_ast
|
||||||
value: Located {
|
value: Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
column: 3,
|
column: 1,
|
||||||
},
|
},
|
||||||
end_location: Some(
|
end_location: Some(
|
||||||
Location {
|
Location {
|
||||||
|
|
|
@ -145,7 +145,7 @@ Located {
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
column: 34,
|
column: 32,
|
||||||
},
|
},
|
||||||
end_location: Some(
|
end_location: Some(
|
||||||
Location {
|
Location {
|
||||||
|
@ -201,7 +201,7 @@ Located {
|
||||||
Located {
|
Located {
|
||||||
location: Location {
|
location: Location {
|
||||||
row: 1,
|
row: 1,
|
||||||
column: 43,
|
column: 41,
|
||||||
},
|
},
|
||||||
end_location: Some(
|
end_location: Some(
|
||||||
Location {
|
Location {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue