parser/tests/fixtures/0011/ast.txt
Saif Eddin Gmati bd2023c3c4
chore: remove fallback expression parser (#181)
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-12-08 21:34:16 +01:00

918 lines
28 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: Infix {
lhs: Variable(
Variable {
start: (
3,
13,
),
name: "a",
end: (
3,
16,
),
},
),
op: Equals,
rhs: 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: Infix {
lhs: Variable(
Variable {
start: (
4,
13,
),
name: "a",
end: (
4,
16,
),
},
),
op: Identical,
rhs: 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: Infix {
lhs: Variable(
Variable {
start: (
5,
13,
),
name: "a",
end: (
5,
16,
),
},
),
op: NotEquals,
rhs: 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: Infix {
lhs: Variable(
Variable {
start: (
6,
13,
),
name: "a",
end: (
6,
16,
),
},
),
op: NotIdentical,
rhs: 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: Infix {
lhs: Variable(
Variable {
start: (
7,
13,
),
name: "a",
end: (
7,
16,
),
},
),
op: Add,
rhs: 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: Infix {
lhs: Variable(
Variable {
start: (
8,
13,
),
name: "a",
end: (
8,
16,
),
},
),
op: Sub,
rhs: 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: Infix {
lhs: Variable(
Variable {
start: (
9,
13,
),
name: "a",
end: (
9,
16,
),
},
),
op: Div,
rhs: 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: Infix {
lhs: Variable(
Variable {
start: (
10,
13,
),
name: "a",
end: (
10,
16,
),
},
),
op: BitwiseXor,
rhs: 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: Infix {
lhs: Variable(
Variable {
start: (
11,
13,
),
name: "a",
end: (
11,
16,
),
},
),
op: Mul,
rhs: 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: Infix {
lhs: Variable(
Variable {
start: (
12,
13,
),
name: "a",
end: (
12,
16,
),
},
),
op: RightShift,
rhs: 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: Infix {
lhs: Variable(
Variable {
start: (
13,
13,
),
name: "a",
end: (
13,
16,
),
},
),
op: LeftShift,
rhs: 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: Infix {
lhs: Variable(
Variable {
start: (
14,
13,
),
name: "a",
end: (
14,
16,
),
},
),
op: BitwiseOr,
rhs: 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: Infix {
lhs: Variable(
Variable {
start: (
15,
13,
),
name: "a",
end: (
15,
16,
),
},
),
op: BitwiseAnd,
rhs: 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: BitwiseNot {
span: (
16,
13,
),
value: Variable(
Variable {
start: (
16,
14,
),
name: "b",
end: (
16,
16,
),
},
),
},
unpack: false,
},
],
},
},
Echo {
values: [
Infix {
lhs: Infix {
lhs: Variable(
Variable {
start: (
18,
6,
),
name: "a",
end: (
18,
9,
),
},
),
op: Add,
rhs: Infix {
lhs: Infix {
lhs: Variable(
Variable {
start: (
18,
11,
),
name: "b",
end: (
18,
14,
),
},
),
op: Mul,
rhs: Variable(
Variable {
start: (
18,
16,
),
name: "c",
end: (
18,
19,
),
},
),
},
op: Div,
rhs: Variable(
Variable {
start: (
18,
21,
),
name: "d",
end: (
18,
24,
),
},
),
},
},
op: Sub,
rhs: DynamicVariable {
name: Ternary {
condition: Infix {
lhs: LiteralString {
value: "foo",
},
op: Concat,
rhs: Variable(
Variable {
start: (
18,
36,
),
name: "c",
end: (
18,
39,
),
},
),
},
then: Some(
LiteralInteger {
i: "4",
},
),
else: LiteralInteger {
i: "3",
},
},
},
},
],
},
]