parser/tests/fixtures/0019/ast.txt
2022-12-06 09:51:13 +01:00

1321 lines
48 KiB
Plaintext

[
BracedNamespace {
name: None,
body: [
Function(
Function {
start: (
4,
5,
),
end: (
4,
28,
),
name: Identifier {
start: (
4,
14,
),
name: "globalFunc",
end: (
4,
24,
),
},
attributes: [],
parameters: FunctionParameterList {
start: (
4,
24,
),
end: (
4,
27,
),
members: [],
},
return_type: None,
by_ref: false,
body: [],
},
),
],
},
BracedNamespace {
name: Some(
Identifier {
start: (
7,
11,
),
name: "foo",
end: (
7,
15,
),
},
),
body: [
Expression {
expr: Infix {
lhs: Variable(
Variable {
start: (
8,
5,
),
name: "a",
end: (
8,
8,
),
},
),
op: Assign,
rhs: Closure(
Closure {
start: (
8,
10,
),
end: (
8,
23,
),
attributes: [],
parameters: FunctionParameterList {
start: (
8,
19,
),
end: (
8,
22,
),
members: [],
},
return_ty: None,
uses: [],
by_ref: false,
body: [],
static: false,
},
),
},
},
Expression {
expr: Infix {
lhs: Variable(
Variable {
start: (
9,
5,
),
name: "b",
end: (
9,
8,
),
},
),
op: Assign,
rhs: Closure(
Closure {
start: (
9,
10,
),
end: (
9,
26,
),
attributes: [],
parameters: FunctionParameterList {
start: (
9,
19,
),
end: (
9,
25,
),
members: [
FunctionParameter {
start: (
9,
20,
),
end: (
9,
23,
),
name: Variable {
start: (
9,
21,
),
name: "b",
end: (
9,
23,
),
},
attributes: [],
type: None,
variadic: false,
default: None,
by_ref: true,
},
],
},
return_ty: None,
uses: [],
by_ref: false,
body: [],
static: false,
},
),
},
},
Expression {
expr: Infix {
lhs: Variable(
Variable {
start: (
10,
5,
),
name: "c",
end: (
10,
8,
),
},
),
op: Assign,
rhs: Closure(
Closure {
start: (
10,
10,
),
end: (
10,
24,
),
attributes: [],
parameters: FunctionParameterList {
start: (
10,
20,
),
end: (
10,
23,
),
members: [],
},
return_ty: None,
uses: [],
by_ref: true,
body: [],
static: false,
},
),
},
},
Expression {
expr: Infix {
lhs: Variable(
Variable {
start: (
11,
5,
),
name: "d",
end: (
11,
8,
),
},
),
op: Assign,
rhs: Closure(
Closure {
start: (
11,
10,
),
end: (
11,
39,
),
attributes: [],
parameters: FunctionParameterList {
start: (
11,
20,
),
end: (
11,
26,
),
members: [
FunctionParameter {
start: (
11,
21,
),
end: (
11,
24,
),
name: Variable {
start: (
11,
22,
),
name: "b",
end: (
11,
24,
),
},
attributes: [],
type: None,
variadic: false,
default: None,
by_ref: true,
},
],
},
return_ty: None,
uses: [],
by_ref: true,
body: [
Return {
value: Some(
Variable(
Variable {
start: (
11,
35,
),
name: "b",
end: (
11,
37,
),
},
),
),
},
],
static: false,
},
),
},
},
Expression {
expr: Infix {
lhs: Variable(
Variable {
start: (
12,
5,
),
name: "e",
end: (
12,
8,
),
},
),
op: Assign,
rhs: ArrowFunction(
ArrowFunction {
start: (
12,
10,
),
end: (
12,
23,
),
attributes: [],
parameters: FunctionParameterList {
start: (
12,
13,
),
end: (
12,
16,
),
members: [],
},
return_type: None,
by_ref: false,
body: Null,
static: false,
},
),
},
},
Expression {
expr: Infix {
lhs: Variable(
Variable {
start: (
13,
5,
),
name: "f",
end: (
13,
8,
),
},
),
op: Assign,
rhs: ArrowFunction(
ArrowFunction {
start: (
13,
10,
),
end: (
13,
26,
),
attributes: [],
parameters: FunctionParameterList {
start: (
13,
13,
),
end: (
13,
19,
),
members: [
FunctionParameter {
start: (
13,
14,
),
end: (
13,
17,
),
name: Variable {
start: (
13,
15,
),
name: "b",
end: (
13,
17,
),
},
attributes: [],
type: None,
variadic: false,
default: None,
by_ref: true,
},
],
},
return_type: None,
by_ref: false,
body: Null,
static: false,
},
),
},
},
Expression {
expr: Infix {
lhs: Variable(
Variable {
start: (
14,
5,
),
name: "g",
end: (
14,
8,
),
},
),
op: Assign,
rhs: ArrowFunction(
ArrowFunction {
start: (
14,
10,
),
end: (
14,
24,
),
attributes: [],
parameters: FunctionParameterList {
start: (
14,
14,
),
end: (
14,
17,
),
members: [],
},
return_type: None,
by_ref: true,
body: Null,
static: false,
},
),
},
},
Expression {
expr: Infix {
lhs: Variable(
Variable {
start: (
15,
5,
),
name: "h",
end: (
15,
8,
),
},
),
op: Assign,
rhs: ArrowFunction(
ArrowFunction {
start: (
15,
10,
),
end: (
15,
25,
),
attributes: [],
parameters: FunctionParameterList {
start: (
15,
14,
),
end: (
15,
20,
),
members: [
FunctionParameter {
start: (
15,
15,
),
end: (
15,
18,
),
name: Variable {
start: (
15,
16,
),
name: "b",
end: (
15,
18,
),
},
attributes: [],
type: None,
variadic: false,
default: None,
by_ref: true,
},
],
},
return_type: None,
by_ref: true,
body: Variable(
Variable {
start: (
15,
23,
),
name: "b",
end: (
15,
25,
),
},
),
static: false,
},
),
},
},
],
},
BracedNamespace {
name: Some(
Identifier {
start: (
18,
11,
),
name: "bar",
end: (
18,
15,
),
},
),
body: [
Expression {
expr: Infix {
lhs: Variable(
Variable {
start: (
19,
5,
),
name: "a",
end: (
19,
8,
),
},
),
op: Assign,
rhs: Closure(
Closure {
start: (
19,
10,
),
end: (
19,
30,
),
attributes: [],
parameters: FunctionParameterList {
start: (
19,
26,
),
end: (
19,
29,
),
members: [],
},
return_ty: None,
uses: [],
by_ref: false,
body: [],
static: true,
},
),
},
},
Expression {
expr: Infix {
lhs: Variable(
Variable {
start: (
20,
5,
),
name: "b",
end: (
20,
8,
),
},
),
op: Assign,
rhs: Closure(
Closure {
start: (
20,
10,
),
end: (
20,
33,
),
attributes: [],
parameters: FunctionParameterList {
start: (
20,
26,
),
end: (
20,
32,
),
members: [
FunctionParameter {
start: (
20,
27,
),
end: (
20,
30,
),
name: Variable {
start: (
20,
28,
),
name: "b",
end: (
20,
30,
),
},
attributes: [],
type: None,
variadic: false,
default: None,
by_ref: true,
},
],
},
return_ty: None,
uses: [],
by_ref: false,
body: [],
static: true,
},
),
},
},
Expression {
expr: Infix {
lhs: Variable(
Variable {
start: (
21,
5,
),
name: "c",
end: (
21,
8,
),
},
),
op: Assign,
rhs: Closure(
Closure {
start: (
21,
10,
),
end: (
21,
31,
),
attributes: [],
parameters: FunctionParameterList {
start: (
21,
27,
),
end: (
21,
30,
),
members: [],
},
return_ty: None,
uses: [],
by_ref: true,
body: [],
static: true,
},
),
},
},
Expression {
expr: Infix {
lhs: Variable(
Variable {
start: (
22,
5,
),
name: "d",
end: (
22,
8,
),
},
),
op: Assign,
rhs: Closure(
Closure {
start: (
22,
10,
),
end: (
22,
46,
),
attributes: [],
parameters: FunctionParameterList {
start: (
22,
27,
),
end: (
22,
33,
),
members: [
FunctionParameter {
start: (
22,
28,
),
end: (
22,
31,
),
name: Variable {
start: (
22,
29,
),
name: "b",
end: (
22,
31,
),
},
attributes: [],
type: None,
variadic: false,
default: None,
by_ref: true,
},
],
},
return_ty: None,
uses: [],
by_ref: true,
body: [
Return {
value: Some(
Variable(
Variable {
start: (
22,
42,
),
name: "b",
end: (
22,
44,
),
},
),
),
},
],
static: true,
},
),
},
},
Expression {
expr: Infix {
lhs: Variable(
Variable {
start: (
23,
5,
),
name: "e",
end: (
23,
8,
),
},
),
op: Assign,
rhs: ArrowFunction(
ArrowFunction {
start: (
23,
10,
),
end: (
23,
30,
),
attributes: [],
parameters: FunctionParameterList {
start: (
23,
20,
),
end: (
23,
23,
),
members: [],
},
return_type: None,
by_ref: false,
body: Null,
static: true,
},
),
},
},
Expression {
expr: Infix {
lhs: Variable(
Variable {
start: (
24,
5,
),
name: "f",
end: (
24,
8,
),
},
),
op: Assign,
rhs: ArrowFunction(
ArrowFunction {
start: (
24,
10,
),
end: (
24,
33,
),
attributes: [],
parameters: FunctionParameterList {
start: (
24,
20,
),
end: (
24,
26,
),
members: [
FunctionParameter {
start: (
24,
21,
),
end: (
24,
24,
),
name: Variable {
start: (
24,
22,
),
name: "b",
end: (
24,
24,
),
},
attributes: [],
type: None,
variadic: false,
default: None,
by_ref: true,
},
],
},
return_type: None,
by_ref: false,
body: Null,
static: true,
},
),
},
},
Expression {
expr: Infix {
lhs: Variable(
Variable {
start: (
25,
5,
),
name: "g",
end: (
25,
8,
),
},
),
op: Assign,
rhs: ArrowFunction(
ArrowFunction {
start: (
25,
10,
),
end: (
25,
31,
),
attributes: [],
parameters: FunctionParameterList {
start: (
25,
21,
),
end: (
25,
24,
),
members: [],
},
return_type: None,
by_ref: true,
body: Null,
static: true,
},
),
},
},
Expression {
expr: Infix {
lhs: Variable(
Variable {
start: (
26,
5,
),
name: "h",
end: (
26,
8,
),
},
),
op: Assign,
rhs: ArrowFunction(
ArrowFunction {
start: (
26,
10,
),
end: (
26,
32,
),
attributes: [],
parameters: FunctionParameterList {
start: (
26,
21,
),
end: (
26,
27,
),
members: [
FunctionParameter {
start: (
26,
22,
),
end: (
26,
25,
),
name: Variable {
start: (
26,
23,
),
name: "b",
end: (
26,
25,
),
},
attributes: [],
type: None,
variadic: false,
default: None,
by_ref: true,
},
],
},
return_type: None,
by_ref: true,
body: Variable(
Variable {
start: (
26,
30,
),
name: "b",
end: (
26,
32,
),
},
),
static: true,
},
),
},
},
],
},
BracedNamespace {
name: Some(
Identifier {
start: (
29,
11,
),
name: "baz",
end: (
29,
15,
),
},
),
body: [
Function(
Function {
start: (
30,
5,
),
end: (
30,
22,
),
name: Identifier {
start: (
30,
14,
),
name: "a",
end: (
30,
15,
),
},
attributes: [],
parameters: FunctionParameterList {
start: (
30,
15,
),
end: (
30,
21,
),
members: [
FunctionParameter {
start: (
30,
16,
),
end: (
30,
19,
),
name: Variable {
start: (
30,
17,
),
name: "b",
end: (
30,
19,
),
},
attributes: [],
type: None,
variadic: false,
default: None,
by_ref: true,
},
],
},
return_type: None,
by_ref: false,
body: [],
},
),
Function(
Function {
start: (
31,
5,
),
end: (
31,
34,
),
name: Identifier {
start: (
31,
15,
),
name: "b",
end: (
31,
16,
),
},
attributes: [],
parameters: FunctionParameterList {
start: (
31,
16,
),
end: (
31,
21,
),
members: [
FunctionParameter {
start: (
31,
17,
),
end: (
31,
19,
),
name: Variable {
start: (
31,
17,
),
name: "b",
end: (
31,
19,
),
},
attributes: [],
type: None,
variadic: false,
default: None,
by_ref: false,
},
],
},
return_type: None,
by_ref: true,
body: [
Return {
value: Some(
Variable(
Variable {
start: (
31,
30,
),
name: "b",
end: (
31,
32,
),
},
),
),
},
],
},
),
Function(
Function {
start: (
32,
5,
),
end: (
32,
32,
),
name: Identifier {
start: (
32,
15,
),
name: "c",
end: (
32,
16,
),
},
attributes: [],
parameters: FunctionParameterList {
start: (
32,
16,
),
end: (
32,
19,
),
members: [],
},
return_type: None,
by_ref: true,
body: [
Return {
value: Some(
Variable(
Variable {
start: (
32,
28,
),
name: "b",
end: (
32,
30,
),
},
),
),
},
],
},
),
],
},
]