Add end locations to all nodes (#4192)
This commit is contained in:
@@ -0,0 +1,104 @@
|
||||
---
|
||||
source: compiler/parser/src/context.rs
|
||||
expression: parse_ast
|
||||
---
|
||||
[
|
||||
Located {
|
||||
start: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 14,
|
||||
},
|
||||
custom: (),
|
||||
node: Assign {
|
||||
targets: [
|
||||
Located {
|
||||
start: Location {
|
||||
row: 1,
|
||||
column: 1,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 2,
|
||||
},
|
||||
custom: (),
|
||||
node: Name {
|
||||
id: "x",
|
||||
ctx: Store,
|
||||
},
|
||||
},
|
||||
],
|
||||
value: Located {
|
||||
start: Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 13,
|
||||
},
|
||||
custom: (),
|
||||
node: Tuple {
|
||||
elts: [
|
||||
Located {
|
||||
start: Location {
|
||||
row: 1,
|
||||
column: 6,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 7,
|
||||
},
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
1,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
row: 1,
|
||||
column: 9,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 10,
|
||||
},
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
2,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
},
|
||||
Located {
|
||||
start: Location {
|
||||
row: 1,
|
||||
column: 12,
|
||||
},
|
||||
end: Location {
|
||||
row: 1,
|
||||
column: 13,
|
||||
},
|
||||
custom: (),
|
||||
node: Constant {
|
||||
value: Int(
|
||||
3,
|
||||
),
|
||||
kind: None,
|
||||
},
|
||||
},
|
||||
],
|
||||
ctx: Load,
|
||||
},
|
||||
},
|
||||
type_comment: None,
|
||||
},
|
||||
},
|
||||
]
|
||||
Reference in New Issue
Block a user