parser/tests/fixtures/0017/ast.txt
Saif Eddin Gmati 6a6d4d0e5f
chore: refactor ident and dynamic var parsers (#192)
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-12-10 15:24:55 +01:00

186 lines
5.3 KiB
Plaintext

[
Expression {
expr: AssignmentOperation(
Assign {
left: Variable(
SimpleVariable(
SimpleVariable {
span: (
3,
1,
),
name: "a",
},
),
),
span: (
3,
4,
),
right: New {
target: Identifier(
SimpleIdentifier(
SimpleIdentifier {
span: (
3,
10,
),
name: "Foo",
},
),
),
span: (
3,
6,
),
args: [],
},
},
),
},
Expression {
expr: AssignmentOperation(
Assign {
left: Variable(
SimpleVariable(
SimpleVariable {
span: (
4,
1,
),
name: "b",
},
),
),
span: (
4,
4,
),
right: ArithmeticOperation(
Identity {
span: (
4,
6,
),
right: LiteralInteger {
i: "1",
},
},
),
},
),
},
Expression {
expr: AssignmentOperation(
Assign {
left: Variable(
SimpleVariable(
SimpleVariable {
span: (
5,
1,
),
name: "c",
},
),
),
span: (
5,
4,
),
right: BitwiseOperation(
Not {
span: (
5,
6,
),
right: LiteralInteger {
i: "2",
},
},
),
},
),
},
Expression {
expr: AssignmentOperation(
Assign {
left: Variable(
SimpleVariable(
SimpleVariable {
span: (
6,
1,
),
name: "d",
},
),
),
span: (
6,
4,
),
right: ArithmeticOperation(
PreDecrement {
span: (
6,
6,
),
right: Variable(
SimpleVariable(
SimpleVariable {
span: (
6,
8,
),
name: "b",
},
),
),
},
),
},
),
},
Expression {
expr: AssignmentOperation(
Assign {
left: Variable(
SimpleVariable(
SimpleVariable {
span: (
7,
1,
),
name: "e",
},
),
),
span: (
7,
4,
),
right: ArithmeticOperation(
PreIncrement {
span: (
7,
6,
),
right: Variable(
SimpleVariable(
SimpleVariable {
span: (
7,
8,
),
name: "d",
},
),
),
},
),
},
),
},
]