nac3/nac3parser/src/snapshots/nac3parser__parser__tests__...

387 lines
13 KiB
Plaintext
Raw Permalink Normal View History

---
source: nac3parser/src/parser.rs
2021-12-26 00:23:54 +08:00
assertion_line: 186
2021-12-28 01:38:16 +08:00
expression: "parse_program(&source, Default::default()).unwrap()"
---
[
Located {
location: Location {
row: 1,
column: 1,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: AnnAssign {
target: Located {
location: Location {
row: 1,
column: 1,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "a",
ctx: Load,
},
},
annotation: Located {
location: Location {
row: 1,
column: 4,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "int",
ctx: Load,
},
},
value: None,
simple: true,
config_comment: [
"sf1",
],
},
},
Located {
location: Location {
row: 2,
column: 1,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: For {
target: Located {
location: Location {
row: 3,
column: 5,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "i",
ctx: Load,
},
},
iter: Located {
location: Location {
row: 3,
column: 11,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: Tuple {
elts: [
Located {
location: Location {
row: 3,
column: 11,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: Constant {
value: Int(
2022-03-08 02:36:40 +08:00
1,
),
kind: None,
},
},
Located {
location: Location {
row: 3,
column: 15,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: Constant {
value: Str(
"12",
),
kind: None,
},
},
],
ctx: Load,
},
},
body: [
Located {
location: Location {
row: 4,
column: 5,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: AnnAssign {
target: Located {
location: Location {
row: 4,
column: 5,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "a",
ctx: Load,
},
},
annotation: Located {
location: Location {
row: 4,
column: 8,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "int",
ctx: Load,
},
},
value: None,
simple: true,
config_comment: [],
},
},
],
orelse: [],
type_comment: None,
config_comment: [
"sdf4",
"sf2",
],
},
},
Located {
location: Location {
row: 5,
column: 1,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: While {
test: Located {
location: Location {
row: 7,
column: 9,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: Compare {
left: Located {
location: Location {
row: 7,
column: 7,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "i",
ctx: Load,
},
},
ops: [
Lt,
],
comparators: [
Located {
location: Location {
row: 7,
column: 11,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: Constant {
value: Int(
2022-03-08 02:36:40 +08:00
2,
),
kind: None,
},
},
],
},
},
body: [
Located {
location: Location {
row: 9,
column: 5,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: Pass {
config_comment: [
"real pass",
],
},
},
Located {
location: Location {
row: 12,
column: 5,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: Expr {
value: Located {
location: Location {
row: 12,
column: 7,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: BinOp {
left: Located {
location: Location {
row: 12,
column: 5,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: Constant {
value: Int(
2022-03-08 02:36:40 +08:00
1,
),
kind: None,
},
},
op: Add,
right: Located {
location: Location {
row: 12,
column: 9,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: Constant {
value: Int(
2022-03-08 02:36:40 +08:00
2,
),
kind: None,
},
},
},
},
config_comment: [
"expr1",
"expr3",
"expr2",
],
},
},
Located {
location: Location {
row: 13,
column: 5,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: If {
test: Located {
location: Location {
row: 15,
column: 8,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: Constant {
value: Int(
2022-03-08 02:36:40 +08:00
1,
),
kind: None,
},
},
body: [
Located {
location: Location {
row: 16,
column: 9,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: Expr {
value: Located {
location: Location {
row: 16,
column: 9,
2021-12-28 01:38:16 +08:00
file: FileName(
"unknown",
),
},
custom: (),
node: Constant {
value: Int(
2022-03-08 02:36:40 +08:00
3,
),
kind: None,
},
},
config_comment: [],
},
},
],
orelse: [],
config_comment: [
"if3",
"if1",
"if2",
],
},
},
],
orelse: [],
config_comment: [
"3",
"5",
"4",
],
},
},
]