parser/tests/fixtures/0011/ast.txt

1008 lines
34 KiB
Plaintext

[
Expression {
expr: Call {
target: Identifier(
Identifier {
start: (
3,
1,
),
name: "define",
end: (
3,
7,
),
},
),
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: ComparisonOperation(
Equal {
left: Variable(
Variable {
start: (
3,
13,
),
name: "a",
end: (
3,
16,
),
},
),
span: (
3,
16,
),
right: Variable(
Variable {
start: (
3,
19,
),
name: "b",
end: (
3,
21,
),
},
),
},
),
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier(
Identifier {
start: (
4,
1,
),
name: "define",
end: (
4,
7,
),
},
),
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: ComparisonOperation(
Identical {
left: Variable(
Variable {
start: (
4,
13,
),
name: "a",
end: (
4,
16,
),
},
),
span: (
4,
16,
),
right: Variable(
Variable {
start: (
4,
20,
),
name: "b",
end: (
4,
22,
),
},
),
},
),
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier(
Identifier {
start: (
5,
1,
),
name: "define",
end: (
5,
7,
),
},
),
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: ComparisonOperation(
NotEqual {
left: Variable(
Variable {
start: (
5,
13,
),
name: "a",
end: (
5,
16,
),
},
),
span: (
5,
16,
),
right: Variable(
Variable {
start: (
5,
19,
),
name: "b",
end: (
5,
21,
),
},
),
},
),
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier(
Identifier {
start: (
6,
1,
),
name: "define",
end: (
6,
7,
),
},
),
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: ComparisonOperation(
NotIdentical {
left: Variable(
Variable {
start: (
6,
13,
),
name: "a",
end: (
6,
16,
),
},
),
span: (
6,
16,
),
right: Variable(
Variable {
start: (
6,
20,
),
name: "b",
end: (
6,
22,
),
},
),
},
),
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier(
Identifier {
start: (
7,
1,
),
name: "define",
end: (
7,
7,
),
},
),
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: ArithmeticOperation(
Addition {
left: Variable(
Variable {
start: (
7,
13,
),
name: "a",
end: (
7,
16,
),
},
),
span: (
7,
16,
),
right: Variable(
Variable {
start: (
7,
18,
),
name: "b",
end: (
7,
20,
),
},
),
},
),
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier(
Identifier {
start: (
8,
1,
),
name: "define",
end: (
8,
7,
),
},
),
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: ArithmeticOperation(
Subtraction {
left: Variable(
Variable {
start: (
8,
13,
),
name: "a",
end: (
8,
16,
),
},
),
span: (
8,
16,
),
right: Variable(
Variable {
start: (
8,
18,
),
name: "b",
end: (
8,
20,
),
},
),
},
),
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier(
Identifier {
start: (
9,
1,
),
name: "define",
end: (
9,
7,
),
},
),
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: ArithmeticOperation(
Division {
left: Variable(
Variable {
start: (
9,
13,
),
name: "a",
end: (
9,
16,
),
},
),
span: (
9,
16,
),
right: Variable(
Variable {
start: (
9,
18,
),
name: "b",
end: (
9,
20,
),
},
),
},
),
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier(
Identifier {
start: (
10,
1,
),
name: "define",
end: (
10,
7,
),
},
),
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: BitwiseOperation(
Xor {
left: Variable(
Variable {
start: (
10,
13,
),
name: "a",
end: (
10,
16,
),
},
),
span: (
10,
16,
),
right: Variable(
Variable {
start: (
10,
18,
),
name: "b",
end: (
10,
20,
),
},
),
},
),
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier(
Identifier {
start: (
11,
1,
),
name: "define",
end: (
11,
7,
),
},
),
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: ArithmeticOperation(
Multiplication {
left: Variable(
Variable {
start: (
11,
13,
),
name: "a",
end: (
11,
16,
),
},
),
span: (
11,
16,
),
right: Variable(
Variable {
start: (
11,
18,
),
name: "b",
end: (
11,
20,
),
},
),
},
),
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier(
Identifier {
start: (
12,
1,
),
name: "define",
end: (
12,
7,
),
},
),
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: BitwiseOperation(
RightShift {
left: Variable(
Variable {
start: (
12,
13,
),
name: "a",
end: (
12,
16,
),
},
),
span: (
12,
16,
),
right: Variable(
Variable {
start: (
12,
19,
),
name: "b",
end: (
12,
21,
),
},
),
},
),
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier(
Identifier {
start: (
13,
1,
),
name: "define",
end: (
13,
7,
),
},
),
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: BitwiseOperation(
LeftShift {
left: Variable(
Variable {
start: (
13,
13,
),
name: "a",
end: (
13,
16,
),
},
),
span: (
13,
16,
),
right: Variable(
Variable {
start: (
13,
19,
),
name: "b",
end: (
13,
21,
),
},
),
},
),
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier(
Identifier {
start: (
14,
1,
),
name: "define",
end: (
14,
7,
),
},
),
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: BitwiseOperation(
Or {
left: Variable(
Variable {
start: (
14,
13,
),
name: "a",
end: (
14,
16,
),
},
),
span: (
14,
16,
),
right: Variable(
Variable {
start: (
14,
18,
),
name: "b",
end: (
14,
20,
),
},
),
},
),
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier(
Identifier {
start: (
15,
1,
),
name: "define",
end: (
15,
7,
),
},
),
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: BitwiseOperation(
And {
left: Variable(
Variable {
start: (
15,
13,
),
name: "a",
end: (
15,
16,
),
},
),
span: (
15,
16,
),
right: Variable(
Variable {
start: (
15,
18,
),
name: "b",
end: (
15,
20,
),
},
),
},
),
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier(
Identifier {
start: (
16,
1,
),
name: "define",
end: (
16,
7,
),
},
),
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: BitwiseOperation(
Not {
span: (
16,
13,
),
right: Variable(
Variable {
start: (
16,
14,
),
name: "b",
end: (
16,
16,
),
},
),
},
),
unpack: false,
},
],
},
},
Echo {
values: [
ArithmeticOperation(
Subtraction {
left: ArithmeticOperation(
Addition {
left: Variable(
Variable {
start: (
18,
6,
),
name: "a",
end: (
18,
9,
),
},
),
span: (
18,
9,
),
right: ArithmeticOperation(
Division {
left: ArithmeticOperation(
Multiplication {
left: Variable(
Variable {
start: (
18,
11,
),
name: "b",
end: (
18,
14,
),
},
),
span: (
18,
14,
),
right: Variable(
Variable {
start: (
18,
16,
),
name: "c",
end: (
18,
19,
),
},
),
},
),
span: (
18,
19,
),
right: Variable(
Variable {
start: (
18,
21,
),
name: "d",
end: (
18,
24,
),
},
),
},
),
},
),
span: (
18,
24,
),
right: DynamicVariable {
name: Ternary {
condition: Concat {
left: LiteralString {
value: "foo",
},
span: (
18,
34,
),
right: Variable(
Variable {
start: (
18,
36,
),
name: "c",
end: (
18,
39,
),
},
),
},
then: Some(
LiteralInteger {
i: "4",
},
),
else: LiteralInteger {
i: "3",
},
},
},
},
),
],
},
]