mirror of
https://github.com/danog/parser.git
synced 2025-01-10 06:38:30 +01:00
558ce71563
Co-authored-by: Ryan Chandler <ryangjchandler@gmail.com> closes https://github.com/ryangjchandler/php-parser-rs/issues/130
128 lines
3.1 KiB
Plaintext
128 lines
3.1 KiB
Plaintext
[
|
|
If {
|
|
condition: Variable {
|
|
name: "a",
|
|
},
|
|
then: [
|
|
Expression {
|
|
expr: Variable {
|
|
name: "a",
|
|
},
|
|
},
|
|
],
|
|
else_ifs: [],
|
|
else: None,
|
|
},
|
|
If {
|
|
condition: Variable {
|
|
name: "a",
|
|
},
|
|
then: [
|
|
Expression {
|
|
expr: Variable {
|
|
name: "a",
|
|
},
|
|
},
|
|
],
|
|
else_ifs: [],
|
|
else: Some(
|
|
[
|
|
Expression {
|
|
expr: Variable {
|
|
name: "b",
|
|
},
|
|
},
|
|
],
|
|
),
|
|
},
|
|
If {
|
|
condition: Bool {
|
|
value: true,
|
|
},
|
|
then: [
|
|
Expression {
|
|
expr: Variable {
|
|
name: "a",
|
|
},
|
|
},
|
|
],
|
|
else_ifs: [
|
|
ElseIf {
|
|
condition: Infix {
|
|
lhs: MethodCall {
|
|
target: Variable {
|
|
name: "foo",
|
|
},
|
|
method: Identifier {
|
|
name: "bar",
|
|
},
|
|
args: [],
|
|
},
|
|
op: And,
|
|
rhs: NullsafeMethodCall {
|
|
target: PropertyFetch {
|
|
target: Variable {
|
|
name: "baz",
|
|
},
|
|
property: Identifier {
|
|
name: "bar",
|
|
},
|
|
},
|
|
method: Identifier {
|
|
name: "qux",
|
|
},
|
|
args: [],
|
|
},
|
|
},
|
|
body: [
|
|
Expression {
|
|
expr: Variable {
|
|
name: "b",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
],
|
|
else: None,
|
|
},
|
|
If {
|
|
condition: Bool {
|
|
value: true,
|
|
},
|
|
then: [
|
|
Expression {
|
|
expr: Variable {
|
|
name: "a",
|
|
},
|
|
},
|
|
],
|
|
else_ifs: [
|
|
ElseIf {
|
|
condition: Bool {
|
|
value: true,
|
|
},
|
|
body: [
|
|
Expression {
|
|
expr: Variable {
|
|
name: "b",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
ElseIf {
|
|
condition: Bool {
|
|
value: true,
|
|
},
|
|
body: [
|
|
Expression {
|
|
expr: Variable {
|
|
name: "c",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
],
|
|
else: None,
|
|
},
|
|
]
|