parser/tests/0011/ast.txt

454 lines
12 KiB
Plaintext
Raw Normal View History

[
Expression {
expr: Call {
target: Identifier {
name: "define",
},
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: Infix {
lhs: Variable {
name: "a",
},
op: Equals,
rhs: Variable {
name: "b",
},
},
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier {
name: "define",
},
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: Infix {
lhs: Variable {
name: "a",
},
op: Identical,
rhs: Variable {
name: "b",
},
},
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier {
name: "define",
},
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: Infix {
lhs: Variable {
name: "a",
},
op: NotEquals,
rhs: Variable {
name: "b",
},
},
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier {
name: "define",
},
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: Infix {
lhs: Variable {
name: "a",
},
op: NotIdentical,
rhs: Variable {
name: "b",
},
},
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier {
name: "define",
},
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: Infix {
lhs: Variable {
name: "a",
},
op: Add,
rhs: Variable {
name: "b",
},
},
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier {
name: "define",
},
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: Infix {
lhs: Variable {
name: "a",
},
op: Sub,
rhs: Variable {
name: "b",
},
},
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier {
name: "define",
},
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: Infix {
lhs: Variable {
name: "a",
},
op: Div,
rhs: Variable {
name: "b",
},
},
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier {
name: "define",
},
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: Infix {
lhs: Variable {
name: "a",
},
op: BitwiseXor,
rhs: Variable {
name: "b",
},
},
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier {
name: "define",
},
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: Infix {
lhs: Variable {
name: "a",
},
op: Mul,
rhs: Variable {
name: "b",
},
},
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier {
name: "define",
},
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: Infix {
lhs: Variable {
name: "a",
},
op: RightShift,
rhs: Variable {
name: "b",
},
},
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier {
name: "define",
},
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: Infix {
lhs: Variable {
name: "a",
},
op: LeftShift,
rhs: Variable {
name: "b",
},
},
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier {
name: "define",
},
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: Infix {
lhs: Variable {
name: "a",
},
op: BitwiseOr,
rhs: Variable {
name: "b",
},
},
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier {
name: "define",
},
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: Infix {
lhs: Variable {
name: "a",
},
op: BitwiseAnd,
rhs: Variable {
name: "b",
},
},
unpack: false,
},
],
},
},
Expression {
expr: Call {
target: Identifier {
name: "define",
},
args: [
Arg {
name: None,
value: LiteralString {
value: "a",
},
unpack: false,
},
Arg {
name: None,
value: BitwiseNot {
value: Variable {
name: "b",
},
},
unpack: false,
},
],
},
},
Echo {
values: [
Infix {
lhs: Infix {
lhs: Variable {
name: "a",
},
op: Add,
rhs: Infix {
lhs: Infix {
lhs: Variable {
name: "b",
},
op: Mul,
rhs: Variable {
name: "c",
},
},
op: Div,
rhs: Variable {
name: "d",
},
},
},
op: Sub,
rhs: DynamicVariable {
name: Ternary {
condition: Infix {
lhs: LiteralString {
value: "foo",
},
op: Concat,
rhs: Variable {
name: "c",
},
},
then: Some(
LiteralInteger {
i: 4,
},
),
else: LiteralInteger {
i: 3,
},
},
},
},
],
},
]