nac3_sca/nac3parser/src/snapshots/nac3parser__parser__tests__...

387 lines
13 KiB
Plaintext

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