mirror of
https://github.com/danog/parser.git
synced 2024-11-30 04:29:13 +01:00
283 lines
8.5 KiB
Plaintext
283 lines
8.5 KiB
Plaintext
[
|
|
If {
|
|
condition: Variable(
|
|
Variable {
|
|
start: (
|
|
3,
|
|
5,
|
|
),
|
|
name: "a",
|
|
end: (
|
|
3,
|
|
7,
|
|
),
|
|
},
|
|
),
|
|
then: [
|
|
Expression {
|
|
expr: Variable(
|
|
Variable {
|
|
start: (
|
|
4,
|
|
5,
|
|
),
|
|
name: "a",
|
|
end: (
|
|
4,
|
|
7,
|
|
),
|
|
},
|
|
),
|
|
},
|
|
],
|
|
else_ifs: [],
|
|
else: None,
|
|
},
|
|
If {
|
|
condition: Variable(
|
|
Variable {
|
|
start: (
|
|
7,
|
|
5,
|
|
),
|
|
name: "a",
|
|
end: (
|
|
7,
|
|
7,
|
|
),
|
|
},
|
|
),
|
|
then: [
|
|
Expression {
|
|
expr: Variable(
|
|
Variable {
|
|
start: (
|
|
8,
|
|
5,
|
|
),
|
|
name: "a",
|
|
end: (
|
|
8,
|
|
7,
|
|
),
|
|
},
|
|
),
|
|
},
|
|
],
|
|
else_ifs: [],
|
|
else: Some(
|
|
[
|
|
Expression {
|
|
expr: Variable(
|
|
Variable {
|
|
start: (
|
|
10,
|
|
5,
|
|
),
|
|
name: "b",
|
|
end: (
|
|
10,
|
|
7,
|
|
),
|
|
},
|
|
),
|
|
},
|
|
],
|
|
),
|
|
},
|
|
If {
|
|
condition: Bool {
|
|
value: true,
|
|
},
|
|
then: [
|
|
Expression {
|
|
expr: Variable(
|
|
Variable {
|
|
start: (
|
|
14,
|
|
5,
|
|
),
|
|
name: "a",
|
|
end: (
|
|
14,
|
|
7,
|
|
),
|
|
},
|
|
),
|
|
},
|
|
],
|
|
else_ifs: [
|
|
ElseIf {
|
|
condition: LogicalOperation(
|
|
And {
|
|
left: MethodCall {
|
|
target: Variable(
|
|
Variable {
|
|
start: (
|
|
15,
|
|
9,
|
|
),
|
|
name: "foo",
|
|
end: (
|
|
15,
|
|
13,
|
|
),
|
|
},
|
|
),
|
|
method: Identifier(
|
|
Identifier {
|
|
start: (
|
|
15,
|
|
15,
|
|
),
|
|
name: "bar",
|
|
end: (
|
|
15,
|
|
18,
|
|
),
|
|
},
|
|
),
|
|
args: [],
|
|
},
|
|
span: (
|
|
15,
|
|
21,
|
|
),
|
|
right: NullsafeMethodCall {
|
|
target: PropertyFetch {
|
|
target: Variable(
|
|
Variable {
|
|
start: (
|
|
15,
|
|
24,
|
|
),
|
|
name: "baz",
|
|
end: (
|
|
15,
|
|
28,
|
|
),
|
|
},
|
|
),
|
|
property: Identifier(
|
|
Identifier {
|
|
start: (
|
|
15,
|
|
30,
|
|
),
|
|
name: "bar",
|
|
end: (
|
|
15,
|
|
33,
|
|
),
|
|
},
|
|
),
|
|
},
|
|
method: Identifier(
|
|
Identifier {
|
|
start: (
|
|
15,
|
|
36,
|
|
),
|
|
name: "qux",
|
|
end: (
|
|
15,
|
|
39,
|
|
),
|
|
},
|
|
),
|
|
args: [],
|
|
},
|
|
},
|
|
),
|
|
body: [
|
|
Expression {
|
|
expr: Variable(
|
|
Variable {
|
|
start: (
|
|
16,
|
|
5,
|
|
),
|
|
name: "b",
|
|
end: (
|
|
16,
|
|
7,
|
|
),
|
|
},
|
|
),
|
|
},
|
|
],
|
|
},
|
|
],
|
|
else: None,
|
|
},
|
|
If {
|
|
condition: Bool {
|
|
value: true,
|
|
},
|
|
then: [
|
|
Expression {
|
|
expr: Variable(
|
|
Variable {
|
|
start: (
|
|
20,
|
|
5,
|
|
),
|
|
name: "a",
|
|
end: (
|
|
20,
|
|
7,
|
|
),
|
|
},
|
|
),
|
|
},
|
|
],
|
|
else_ifs: [
|
|
ElseIf {
|
|
condition: Bool {
|
|
value: true,
|
|
},
|
|
body: [
|
|
Expression {
|
|
expr: Variable(
|
|
Variable {
|
|
start: (
|
|
22,
|
|
5,
|
|
),
|
|
name: "b",
|
|
end: (
|
|
22,
|
|
7,
|
|
),
|
|
},
|
|
),
|
|
},
|
|
],
|
|
},
|
|
ElseIf {
|
|
condition: Bool {
|
|
value: true,
|
|
},
|
|
body: [
|
|
Expression {
|
|
expr: Variable(
|
|
Variable {
|
|
start: (
|
|
24,
|
|
5,
|
|
),
|
|
name: "c",
|
|
end: (
|
|
24,
|
|
7,
|
|
),
|
|
},
|
|
),
|
|
},
|
|
],
|
|
},
|
|
],
|
|
else: None,
|
|
},
|
|
]
|