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

561 lines
16 KiB
Plaintext

---
source: nac3parser/src/parser.rs
assertion_line: 218
expression: "parse_program(&source, Default::default()).unwrap()"
---
[
Located {
location: Location {
row: 1,
column: 1,
file: FileName(
"unknown",
),
},
custom: (),
node: If {
test: Located {
location: Location {
row: 1,
column: 4,
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "a",
ctx: Load,
},
},
body: [
Located {
location: Location {
row: 1,
column: 7,
file: FileName(
"unknown",
),
},
custom: (),
node: Expr {
value: Located {
location: Location {
row: 1,
column: 7,
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "d",
ctx: Load,
},
},
config_comment: [
"for d",
],
},
},
],
orelse: [],
config_comment: [],
},
},
Located {
location: Location {
row: 2,
column: 1,
file: FileName(
"unknown",
),
},
custom: (),
node: If {
test: Located {
location: Location {
row: 2,
column: 4,
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "b",
ctx: Load,
},
},
body: [
Located {
location: Location {
row: 2,
column: 7,
file: FileName(
"unknown",
),
},
custom: (),
node: Expr {
value: Located {
location: Location {
row: 2,
column: 7,
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "c",
ctx: Load,
},
},
config_comment: [
"for c",
],
},
},
],
orelse: [],
config_comment: [],
},
},
Located {
location: Location {
row: 3,
column: 1,
file: FileName(
"unknown",
),
},
custom: (),
node: If {
test: Located {
location: Location {
row: 3,
column: 4,
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "d",
ctx: Load,
},
},
body: [
Located {
location: Location {
row: 4,
column: 5,
file: FileName(
"unknown",
),
},
custom: (),
node: Expr {
value: Located {
location: Location {
row: 4,
column: 5,
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "b",
ctx: Load,
},
},
config_comment: [],
},
},
Located {
location: Location {
row: 4,
column: 8,
file: FileName(
"unknown",
),
},
custom: (),
node: Expr {
value: Located {
location: Location {
row: 4,
column: 10,
file: FileName(
"unknown",
),
},
custom: (),
node: BinOp {
left: Located {
location: Location {
row: 4,
column: 8,
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "b",
ctx: Load,
},
},
op: Add,
right: Located {
location: Location {
row: 4,
column: 12,
file: FileName(
"unknown",
),
},
custom: (),
node: Constant {
value: Int(
3,
),
kind: None,
},
},
},
},
config_comment: [
"for b + 3",
],
},
},
],
orelse: [],
config_comment: [
"for if d",
],
},
},
Located {
location: Location {
row: 5,
column: 1,
file: FileName(
"unknown",
),
},
custom: (),
node: Assign {
targets: [
Located {
location: Location {
row: 5,
column: 1,
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "a",
ctx: Load,
},
},
],
value: Located {
location: Location {
row: 5,
column: 5,
file: FileName(
"unknown",
),
},
custom: (),
node: Constant {
value: Int(
3,
),
kind: None,
},
},
type_comment: None,
config_comment: [],
},
},
Located {
location: Location {
row: 5,
column: 8,
file: FileName(
"unknown",
),
},
custom: (),
node: Expr {
value: Located {
location: Location {
row: 5,
column: 10,
file: FileName(
"unknown",
),
},
custom: (),
node: BinOp {
left: Located {
location: Location {
row: 5,
column: 8,
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "a",
ctx: Load,
},
},
op: Add,
right: Located {
location: Location {
row: 5,
column: 12,
file: FileName(
"unknown",
),
},
custom: (),
node: Constant {
value: Int(
3,
),
kind: None,
},
},
},
},
config_comment: [],
},
},
Located {
location: Location {
row: 5,
column: 15,
file: FileName(
"unknown",
),
},
custom: (),
node: Assign {
targets: [
Located {
location: Location {
row: 5,
column: 15,
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "b",
ctx: Load,
},
},
],
value: Located {
location: Location {
row: 5,
column: 19,
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "a",
ctx: Load,
},
},
type_comment: None,
config_comment: [
"notif",
],
},
},
Located {
location: Location {
row: 8,
column: 1,
file: FileName(
"unknown",
),
},
custom: (),
node: Assign {
targets: [
Located {
location: Location {
row: 8,
column: 1,
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "aa",
ctx: Load,
},
},
],
value: Located {
location: Location {
row: 8,
column: 6,
file: FileName(
"unknown",
),
},
custom: (),
node: Constant {
value: Int(
3,
),
kind: None,
},
},
type_comment: None,
config_comment: [
"smallsingle1",
"smallsingle3",
"smallsingle2",
],
},
},
Located {
location: Location {
row: 9,
column: 1,
file: FileName(
"unknown",
),
},
custom: (),
node: If {
test: Located {
location: Location {
row: 9,
column: 4,
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "a",
ctx: Load,
},
},
body: [
Located {
location: Location {
row: 10,
column: 5,
file: FileName(
"unknown",
),
},
custom: (),
node: Expr {
value: Located {
location: Location {
row: 10,
column: 5,
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "a",
ctx: Load,
},
},
config_comment: [],
},
},
],
orelse: [],
config_comment: [
"small2",
],
},
},
Located {
location: Location {
row: 11,
column: 1,
file: FileName(
"unknown",
),
},
custom: (),
node: For {
target: Located {
location: Location {
row: 11,
column: 5,
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "i",
ctx: Load,
},
},
iter: Located {
location: Location {
row: 11,
column: 10,
file: FileName(
"unknown",
),
},
custom: (),
node: Name {
id: "a",
ctx: Load,
},
},
body: [
Located {
location: Location {
row: 12,
column: 5,
file: FileName(
"unknown",
),
},
custom: (),
node: Pass {
config_comment: [],
},
},
],
orelse: [],
type_comment: None,
config_comment: [
"for1",
],
},
},
]