Add end locations to all nodes (#4192)

This commit is contained in:
Charlie Marsh
2022-10-17 00:18:30 -04:00
committed by GitHub
parent 519718e65d
commit 1cc342e4ed
61 changed files with 3157 additions and 144 deletions

View File

@@ -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,
},
},
]