2021-11-03 16:34:05 +08:00
|
|
|
---
|
2021-11-04 15:03:34 +08:00
|
|
|
source: nac3parser/src/parser.rs
|
2021-12-28 01:38:16 +08:00
|
|
|
assertion_line: 143
|
|
|
|
expression: "parse_program(&source, Default::default()).unwrap()"
|
2021-11-04 15:03:34 +08:00
|
|
|
|
2021-11-03 16:34:05 +08:00
|
|
|
---
|
|
|
|
[
|
|
|
|
Located {
|
|
|
|
location: Location {
|
|
|
|
row: 1,
|
|
|
|
column: 1,
|
2021-12-28 01:38:16 +08:00
|
|
|
file: FileName(
|
|
|
|
"unknown",
|
|
|
|
),
|
2021-11-03 16:34:05 +08:00
|
|
|
},
|
|
|
|
custom: (),
|
|
|
|
node: ClassDef {
|
|
|
|
name: "Foo",
|
|
|
|
bases: [
|
|
|
|
Located {
|
|
|
|
location: Location {
|
|
|
|
row: 1,
|
|
|
|
column: 11,
|
2021-12-28 01:38:16 +08:00
|
|
|
file: FileName(
|
|
|
|
"unknown",
|
|
|
|
),
|
2021-11-03 16:34:05 +08:00
|
|
|
},
|
|
|
|
custom: (),
|
|
|
|
node: Name {
|
|
|
|
id: "A",
|
|
|
|
ctx: Load,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Located {
|
|
|
|
location: Location {
|
|
|
|
row: 1,
|
|
|
|
column: 14,
|
2021-12-28 01:38:16 +08:00
|
|
|
file: FileName(
|
|
|
|
"unknown",
|
|
|
|
),
|
2021-11-03 16:34:05 +08:00
|
|
|
},
|
|
|
|
custom: (),
|
|
|
|
node: Name {
|
|
|
|
id: "B",
|
|
|
|
ctx: Load,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
keywords: [],
|
|
|
|
body: [
|
|
|
|
Located {
|
|
|
|
location: Location {
|
|
|
|
row: 2,
|
|
|
|
column: 2,
|
2021-12-28 01:38:16 +08:00
|
|
|
file: FileName(
|
|
|
|
"unknown",
|
|
|
|
),
|
2021-11-03 16:34:05 +08:00
|
|
|
},
|
|
|
|
custom: (),
|
|
|
|
node: FunctionDef {
|
|
|
|
name: "__init__",
|
|
|
|
args: Arguments {
|
|
|
|
posonlyargs: [],
|
|
|
|
args: [
|
|
|
|
Located {
|
|
|
|
location: Location {
|
|
|
|
row: 2,
|
|
|
|
column: 15,
|
2021-12-28 01:38:16 +08:00
|
|
|
file: FileName(
|
|
|
|
"unknown",
|
|
|
|
),
|
2021-11-03 16:34:05 +08:00
|
|
|
},
|
|
|
|
custom: (),
|
|
|
|
node: ArgData {
|
|
|
|
arg: "self",
|
|
|
|
annotation: None,
|
|
|
|
type_comment: None,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
vararg: None,
|
|
|
|
kwonlyargs: [],
|
|
|
|
kw_defaults: [],
|
|
|
|
kwarg: None,
|
|
|
|
defaults: [],
|
|
|
|
},
|
|
|
|
body: [
|
|
|
|
Located {
|
|
|
|
location: Location {
|
|
|
|
row: 3,
|
|
|
|
column: 3,
|
2021-12-28 01:38:16 +08:00
|
|
|
file: FileName(
|
|
|
|
"unknown",
|
|
|
|
),
|
2021-11-03 16:34:05 +08:00
|
|
|
},
|
|
|
|
custom: (),
|
2021-11-04 15:03:34 +08:00
|
|
|
node: Pass {
|
|
|
|
config_comment: [],
|
|
|
|
},
|
2021-11-03 16:34:05 +08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
decorator_list: [],
|
|
|
|
returns: None,
|
|
|
|
type_comment: None,
|
2021-11-04 15:03:34 +08:00
|
|
|
config_comment: [],
|
2021-11-03 16:34:05 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
Located {
|
|
|
|
location: Location {
|
|
|
|
row: 4,
|
|
|
|
column: 2,
|
2021-12-28 01:38:16 +08:00
|
|
|
file: FileName(
|
|
|
|
"unknown",
|
|
|
|
),
|
2021-11-03 16:34:05 +08:00
|
|
|
},
|
|
|
|
custom: (),
|
|
|
|
node: FunctionDef {
|
|
|
|
name: "method_with_default",
|
|
|
|
args: Arguments {
|
|
|
|
posonlyargs: [],
|
|
|
|
args: [
|
|
|
|
Located {
|
|
|
|
location: Location {
|
|
|
|
row: 4,
|
|
|
|
column: 26,
|
2021-12-28 01:38:16 +08:00
|
|
|
file: FileName(
|
|
|
|
"unknown",
|
|
|
|
),
|
2021-11-03 16:34:05 +08:00
|
|
|
},
|
|
|
|
custom: (),
|
|
|
|
node: ArgData {
|
|
|
|
arg: "self",
|
|
|
|
annotation: None,
|
|
|
|
type_comment: None,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Located {
|
|
|
|
location: Location {
|
|
|
|
row: 4,
|
|
|
|
column: 32,
|
2021-12-28 01:38:16 +08:00
|
|
|
file: FileName(
|
|
|
|
"unknown",
|
|
|
|
),
|
2021-11-03 16:34:05 +08:00
|
|
|
},
|
|
|
|
custom: (),
|
|
|
|
node: ArgData {
|
|
|
|
arg: "arg",
|
|
|
|
annotation: None,
|
|
|
|
type_comment: None,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
vararg: None,
|
|
|
|
kwonlyargs: [],
|
|
|
|
kw_defaults: [],
|
|
|
|
kwarg: None,
|
|
|
|
defaults: [
|
|
|
|
Located {
|
|
|
|
location: Location {
|
|
|
|
row: 4,
|
|
|
|
column: 37,
|
2021-12-28 01:38:16 +08:00
|
|
|
file: FileName(
|
|
|
|
"unknown",
|
|
|
|
),
|
2021-11-03 16:34:05 +08:00
|
|
|
},
|
|
|
|
custom: (),
|
|
|
|
node: Constant {
|
|
|
|
value: Str(
|
|
|
|
"default",
|
|
|
|
),
|
|
|
|
kind: None,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
body: [
|
|
|
|
Located {
|
|
|
|
location: Location {
|
|
|
|
row: 5,
|
|
|
|
column: 3,
|
2021-12-28 01:38:16 +08:00
|
|
|
file: FileName(
|
|
|
|
"unknown",
|
|
|
|
),
|
2021-11-03 16:34:05 +08:00
|
|
|
},
|
|
|
|
custom: (),
|
2021-11-04 15:03:34 +08:00
|
|
|
node: Pass {
|
|
|
|
config_comment: [],
|
|
|
|
},
|
2021-11-03 16:34:05 +08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
decorator_list: [],
|
|
|
|
returns: None,
|
|
|
|
type_comment: None,
|
2021-11-04 15:03:34 +08:00
|
|
|
config_comment: [],
|
2021-11-03 16:34:05 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
decorator_list: [],
|
2021-11-04 15:03:34 +08:00
|
|
|
config_comment: [],
|
2021-11-03 16:34:05 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|