Replace row/column based Location with byte-offsets.
This commit is contained in:
committed by
Jeong YunWon
parent
7b8844bd3e
commit
58c35ab458
@@ -4,46 +4,19 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||
---
|
||||
[
|
||||
Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 0,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 11,
|
||||
},
|
||||
),
|
||||
range: 0..11,
|
||||
custom: (),
|
||||
node: Assign(
|
||||
StmtAssign {
|
||||
targets: [
|
||||
Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 0,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 4,
|
||||
},
|
||||
),
|
||||
range: 0..4,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 0,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
),
|
||||
range: 0..1,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
@@ -53,16 +26,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 3,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 4,
|
||||
},
|
||||
),
|
||||
range: 3..4,
|
||||
custom: (),
|
||||
node: Name(
|
||||
ExprName {
|
||||
@@ -78,31 +42,13 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||
},
|
||||
],
|
||||
value: Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 11,
|
||||
},
|
||||
),
|
||||
range: 7..11,
|
||||
custom: (),
|
||||
node: Tuple(
|
||||
ExprTuple {
|
||||
elts: [
|
||||
Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 8,
|
||||
},
|
||||
),
|
||||
range: 7..8,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
@@ -114,16 +60,7 @@ expression: "parse_program(source, \"<test>\").unwrap()"
|
||||
),
|
||||
},
|
||||
Located {
|
||||
location: Location {
|
||||
row: 1,
|
||||
column: 10,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 11,
|
||||
},
|
||||
),
|
||||
range: 10..11,
|
||||
custom: (),
|
||||
node: Constant(
|
||||
ExprConstant {
|
||||
|
||||
Reference in New Issue
Block a user