Implement asdl in the ast and parser

This commit is contained in:
Noah
2020-11-28 14:57:00 -06:00
parent 0063c766b7
commit b8aabb7bb7
41 changed files with 3135 additions and 1855 deletions

View File

@@ -0,0 +1,104 @@
---
source: parser/src/parser.rs
expression: parse_program(&source).unwrap()
---
[
Located {
location: Location {
row: 1,
column: 1,
},
custom: (),
node: Assign {
targets: [
Located {
location: Location {
row: 1,
column: 1,
},
custom: (),
node: Tuple {
elts: [
Located {
location: Location {
row: 1,
column: 1,
},
custom: (),
node: Name {
id: "a",
ctx: Load,
},
},
Located {
location: Location {
row: 1,
column: 4,
},
custom: (),
node: Name {
id: "b",
ctx: Load,
},
},
],
ctx: Load,
},
},
],
value: Located {
location: Location {
row: 1,
column: 8,
},
custom: (),
node: Tuple {
elts: [
Located {
location: Location {
row: 1,
column: 8,
},
custom: (),
node: Constant {
value: Int(
BigInt {
sign: Plus,
data: BigUint {
data: [
4,
],
},
},
),
kind: None,
},
},
Located {
location: Location {
row: 1,
column: 11,
},
custom: (),
node: Constant {
value: Int(
BigInt {
sign: Plus,
data: BigUint {
data: [
5,
],
},
},
),
kind: None,
},
},
],
ctx: Load,
},
},
type_comment: None,
},
},
]