mirror of
https://github.com/danog/parser.git
synced 2024-11-27 04:14:55 +01:00
254 lines
5.7 KiB
Plaintext
254 lines
5.7 KiB
Plaintext
[
|
|
Foreach {
|
|
expr: Variable(
|
|
Variable {
|
|
start: (
|
|
3,
|
|
10,
|
|
),
|
|
name: "a",
|
|
end: (
|
|
3,
|
|
13,
|
|
),
|
|
},
|
|
),
|
|
by_ref: true,
|
|
key_var: None,
|
|
value_var: Variable(
|
|
Variable {
|
|
start: (
|
|
3,
|
|
17,
|
|
),
|
|
name: "b",
|
|
end: (
|
|
3,
|
|
19,
|
|
),
|
|
},
|
|
),
|
|
body: [],
|
|
},
|
|
Foreach {
|
|
expr: Variable(
|
|
Variable {
|
|
start: (
|
|
5,
|
|
10,
|
|
),
|
|
name: "a",
|
|
end: (
|
|
5,
|
|
13,
|
|
),
|
|
},
|
|
),
|
|
by_ref: true,
|
|
key_var: Some(
|
|
Variable(
|
|
Variable {
|
|
start: (
|
|
5,
|
|
16,
|
|
),
|
|
name: "b",
|
|
end: (
|
|
5,
|
|
19,
|
|
),
|
|
},
|
|
),
|
|
),
|
|
value_var: Variable(
|
|
Variable {
|
|
start: (
|
|
5,
|
|
23,
|
|
),
|
|
name: "c",
|
|
end: (
|
|
5,
|
|
25,
|
|
),
|
|
},
|
|
),
|
|
body: [],
|
|
},
|
|
Switch {
|
|
condition: Variable(
|
|
Variable {
|
|
start: (
|
|
7,
|
|
9,
|
|
),
|
|
name: "a",
|
|
end: (
|
|
7,
|
|
11,
|
|
),
|
|
},
|
|
),
|
|
cases: [
|
|
Case {
|
|
condition: Some(
|
|
LiteralInteger {
|
|
i: "0",
|
|
},
|
|
),
|
|
body: [
|
|
Break {
|
|
num: None,
|
|
},
|
|
],
|
|
},
|
|
Case {
|
|
condition: Some(
|
|
LiteralInteger {
|
|
i: "1",
|
|
},
|
|
),
|
|
body: [],
|
|
},
|
|
Case {
|
|
condition: None,
|
|
body: [],
|
|
},
|
|
],
|
|
},
|
|
Foreach {
|
|
expr: Variable(
|
|
Variable {
|
|
start: (
|
|
14,
|
|
10,
|
|
),
|
|
name: "foo",
|
|
end: (
|
|
14,
|
|
15,
|
|
),
|
|
},
|
|
),
|
|
by_ref: false,
|
|
key_var: None,
|
|
value_var: Array {
|
|
items: [
|
|
ArrayItem {
|
|
key: None,
|
|
value: Variable(
|
|
Variable {
|
|
start: (
|
|
14,
|
|
19,
|
|
),
|
|
name: "baz",
|
|
end: (
|
|
14,
|
|
23,
|
|
),
|
|
},
|
|
),
|
|
unpack: false,
|
|
by_ref: false,
|
|
},
|
|
ArrayItem {
|
|
key: None,
|
|
value: Variable(
|
|
Variable {
|
|
start: (
|
|
14,
|
|
25,
|
|
),
|
|
name: "car",
|
|
end: (
|
|
14,
|
|
29,
|
|
),
|
|
},
|
|
),
|
|
unpack: false,
|
|
by_ref: false,
|
|
},
|
|
],
|
|
},
|
|
body: [],
|
|
},
|
|
Foreach {
|
|
expr: Variable(
|
|
Variable {
|
|
start: (
|
|
16,
|
|
10,
|
|
),
|
|
name: "foo",
|
|
end: (
|
|
16,
|
|
15,
|
|
),
|
|
},
|
|
),
|
|
by_ref: false,
|
|
key_var: Some(
|
|
Variable(
|
|
Variable {
|
|
start: (
|
|
16,
|
|
18,
|
|
),
|
|
name: "bar",
|
|
end: (
|
|
16,
|
|
23,
|
|
),
|
|
},
|
|
),
|
|
),
|
|
value_var: Variable(
|
|
Variable {
|
|
start: (
|
|
16,
|
|
26,
|
|
),
|
|
name: "baz",
|
|
end: (
|
|
16,
|
|
30,
|
|
),
|
|
},
|
|
),
|
|
body: [],
|
|
},
|
|
Foreach {
|
|
expr: Variable(
|
|
Variable {
|
|
start: (
|
|
18,
|
|
10,
|
|
),
|
|
name: "foo",
|
|
end: (
|
|
18,
|
|
15,
|
|
),
|
|
},
|
|
),
|
|
by_ref: false,
|
|
key_var: None,
|
|
value_var: Variable(
|
|
Variable {
|
|
start: (
|
|
18,
|
|
18,
|
|
),
|
|
name: "bar",
|
|
end: (
|
|
18,
|
|
22,
|
|
),
|
|
},
|
|
),
|
|
body: [],
|
|
},
|
|
]
|