forked from M-Labs/nac3
203 lines
7.5 KiB
Plaintext
203 lines
7.5 KiB
Plaintext
---
|
|
source: nac3parser/src/parser.rs
|
|
assertion_line: 143
|
|
expression: "parse_program(&source, Default::default()).unwrap()"
|
|
|
|
---
|
|
[
|
|
Located {
|
|
location: Location {
|
|
row: 1,
|
|
column: 1,
|
|
file: FileName(
|
|
"unknown",
|
|
),
|
|
},
|
|
custom: (),
|
|
node: ClassDef {
|
|
name: "Foo",
|
|
bases: [
|
|
Located {
|
|
location: Location {
|
|
row: 1,
|
|
column: 11,
|
|
file: FileName(
|
|
"unknown",
|
|
),
|
|
},
|
|
custom: (),
|
|
node: Name {
|
|
id: "A",
|
|
ctx: Load,
|
|
},
|
|
},
|
|
Located {
|
|
location: Location {
|
|
row: 1,
|
|
column: 14,
|
|
file: FileName(
|
|
"unknown",
|
|
),
|
|
},
|
|
custom: (),
|
|
node: Name {
|
|
id: "B",
|
|
ctx: Load,
|
|
},
|
|
},
|
|
],
|
|
keywords: [],
|
|
body: [
|
|
Located {
|
|
location: Location {
|
|
row: 2,
|
|
column: 2,
|
|
file: FileName(
|
|
"unknown",
|
|
),
|
|
},
|
|
custom: (),
|
|
node: FunctionDef {
|
|
name: "__init__",
|
|
args: Arguments {
|
|
posonlyargs: [],
|
|
args: [
|
|
Located {
|
|
location: Location {
|
|
row: 2,
|
|
column: 15,
|
|
file: FileName(
|
|
"unknown",
|
|
),
|
|
},
|
|
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,
|
|
file: FileName(
|
|
"unknown",
|
|
),
|
|
},
|
|
custom: (),
|
|
node: Pass {
|
|
config_comment: [],
|
|
},
|
|
},
|
|
],
|
|
decorator_list: [],
|
|
returns: None,
|
|
type_comment: None,
|
|
config_comment: [],
|
|
},
|
|
},
|
|
Located {
|
|
location: Location {
|
|
row: 4,
|
|
column: 2,
|
|
file: FileName(
|
|
"unknown",
|
|
),
|
|
},
|
|
custom: (),
|
|
node: FunctionDef {
|
|
name: "method_with_default",
|
|
args: Arguments {
|
|
posonlyargs: [],
|
|
args: [
|
|
Located {
|
|
location: Location {
|
|
row: 4,
|
|
column: 26,
|
|
file: FileName(
|
|
"unknown",
|
|
),
|
|
},
|
|
custom: (),
|
|
node: ArgData {
|
|
arg: "self",
|
|
annotation: None,
|
|
type_comment: None,
|
|
},
|
|
},
|
|
Located {
|
|
location: Location {
|
|
row: 4,
|
|
column: 32,
|
|
file: FileName(
|
|
"unknown",
|
|
),
|
|
},
|
|
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,
|
|
file: FileName(
|
|
"unknown",
|
|
),
|
|
},
|
|
custom: (),
|
|
node: Constant {
|
|
value: Str(
|
|
"default",
|
|
),
|
|
kind: None,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
body: [
|
|
Located {
|
|
location: Location {
|
|
row: 5,
|
|
column: 3,
|
|
file: FileName(
|
|
"unknown",
|
|
),
|
|
},
|
|
custom: (),
|
|
node: Pass {
|
|
config_comment: [],
|
|
},
|
|
},
|
|
],
|
|
decorator_list: [],
|
|
returns: None,
|
|
type_comment: None,
|
|
config_comment: [],
|
|
},
|
|
},
|
|
],
|
|
decorator_list: [],
|
|
config_comment: [],
|
|
},
|
|
},
|
|
]
|