parser/tests/fixtures/0038/ast.txt
azjezz 479f51913c
chore: remove build script
Signed-off-by: azjezz <azjezz@protonmail.com>
2022-12-05 18:36:04 +01:00

171 lines
6.0 KiB
Plaintext

[
Function {
name: Identifier {
start: (
3,
10,
),
name: "fib",
end: (
3,
13,
),
},
attributes: [],
params: [
Param {
name: Variable {
start: (
3,
14,
),
name: "n",
end: (
3,
16,
),
},
attributes: [],
type: None,
variadic: false,
default: None,
flags: [],
by_ref: false,
},
],
body: [
If {
condition: Infix {
lhs: Variable(
Variable {
start: (
4,
9,
),
name: "n",
end: (
4,
12,
),
},
),
op: LessThan,
rhs: LiteralInteger {
i: 2,
},
},
then: [
Return {
value: Some(
Variable(
Variable {
start: (
5,
16,
),
name: "n",
end: (
5,
18,
),
},
),
),
},
],
else_ifs: [],
else: None,
},
Return {
value: Some(
Infix {
lhs: Call {
target: Identifier(
Identifier {
start: (
8,
12,
),
name: "fib",
end: (
8,
15,
),
},
),
args: [
Arg {
name: None,
value: Infix {
lhs: Variable(
Variable {
start: (
8,
16,
),
name: "n",
end: (
8,
19,
),
},
),
op: Sub,
rhs: LiteralInteger {
i: 1,
},
},
unpack: false,
},
],
},
op: Add,
rhs: Call {
target: Identifier(
Identifier {
start: (
8,
26,
),
name: "fib",
end: (
8,
29,
),
},
),
args: [
Arg {
name: None,
value: Infix {
lhs: Variable(
Variable {
start: (
8,
30,
),
name: "n",
end: (
8,
33,
),
},
),
op: Sub,
rhs: LiteralInteger {
i: 2,
},
},
unpack: false,
},
],
},
},
),
},
],
return_type: None,
by_ref: false,
},
]