parser/tests/fixtures/0018/ast.txt

145 lines
3.3 KiB
Plaintext

[
Function(
Function {
start: (
3,
1,
),
end: (
7,
1,
),
name: Identifier {
start: (
3,
10,
),
name: "a",
end: (
3,
11,
),
},
attributes: [],
parameters: FunctionParameterList {
start: (
3,
11,
),
end: (
3,
13,
),
members: [],
},
return_type: Some(
Null,
),
by_ref: false,
body: [
Echo {
values: [
LiteralString {
value: "looping..\n",
},
],
},
Return {
value: Some(
Null,
),
},
],
},
),
Expression {
expr: AssignmentOperation(
Assign {
left: Variable(
Variable {
start: (
9,
1,
),
name: "bar",
end: (
9,
6,
),
},
),
span: (
9,
6,
),
right: Call {
target: Identifier(
Identifier {
start: (
9,
8,
),
name: "a",
end: (
9,
9,
),
},
),
args: [
Arg {
name: None,
value: VariadicPlaceholder,
unpack: false,
},
],
},
},
),
},
Label {
label: Identifier {
start: (
11,
1,
),
name: "foo",
end: (
11,
4,
),
},
},
Expression {
expr: Call {
target: Variable(
Variable {
start: (
12,
5,
),
name: "bar",
end: (
12,
9,
),
},
),
args: [],
},
},
Goto {
label: Identifier {
start: (
13,
10,
),
name: "foo",
end: (
13,
13,
),
},
},
]