Add end locations to all nodes (#4192)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
---
|
||||
source: parser/src/parser.rs
|
||||
expression: parse_program(&source).unwrap()
|
||||
|
||||
source: compiler/parser/src/parser.rs
|
||||
expression: "parse_program(source, \"<test>\").unwrap()"
|
||||
---
|
||||
[
|
||||
Located {
|
||||
@@ -9,6 +8,12 @@ expression: parse_program(&source).unwrap()
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 12,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Assign {
|
||||
targets: [
|
||||
@@ -17,6 +22,12 @@ expression: parse_program(&source).unwrap()
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 5,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
elts: [
|
||||
@@ -25,6 +36,12 @@ expression: parse_program(&source).unwrap()
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "a",
|
||||
@@ -36,6 +53,12 @@ expression: parse_program(&source).unwrap()
|
||||
row: 1,
|
||||
column: 4,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 5,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "b",
|
||||
@@ -52,6 +75,12 @@ expression: parse_program(&source).unwrap()
|
||||
row: 1,
|
||||
column: 8,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 12,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
elts: [
|
||||
@@ -60,6 +89,12 @@ expression: parse_program(&source).unwrap()
|
||||
row: 1,
|
||||
column: 8,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 9,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
@@ -73,6 +108,12 @@ expression: parse_program(&source).unwrap()
|
||||
row: 1,
|
||||
column: 11,
|
||||
},
|
||||
end_location: Some(
|
||||
Location {
|
||||
row: 1,
|
||||
column: 12,
|
||||
},
|
||||
),
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
|
||||
Reference in New Issue
Block a user