2024-12-21 03:10:03 +00:00
|
|
|
Program {
|
|
|
|
ast: Block(
|
2024-12-21 21:09:10 +00:00
|
|
|
[
|
|
|
|
Expr(
|
|
|
|
ForLoop {
|
|
|
|
init: Statement(
|
|
|
|
Let {
|
|
|
|
name: Ident(
|
|
|
|
"i",
|
|
|
|
),
|
|
|
|
typ: None,
|
|
|
|
val: Some(
|
|
|
|
Literal(
|
|
|
|
Number(
|
|
|
|
Number {
|
|
|
|
val: 0,
|
|
|
|
base: 10,
|
|
|
|
signed: false,
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
},
|
|
|
|
),
|
|
|
|
test: BinOp {
|
|
|
|
typ: Lt,
|
|
|
|
left: Path(
|
|
|
|
Path(
|
|
|
|
[
|
|
|
|
Ident(
|
|
|
|
"i",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
right: Literal(
|
|
|
|
Number(
|
|
|
|
Number {
|
|
|
|
val: 10,
|
|
|
|
base: 10,
|
|
|
|
signed: false,
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
},
|
|
|
|
on_loop: BinOp {
|
|
|
|
typ: AddEq,
|
|
|
|
left: Path(
|
|
|
|
Path(
|
|
|
|
[
|
|
|
|
Ident(
|
|
|
|
"i",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
right: Literal(
|
|
|
|
Number(
|
|
|
|
Number {
|
|
|
|
val: 1,
|
|
|
|
base: 10,
|
|
|
|
signed: false,
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
},
|
|
|
|
body: Block(
|
|
|
|
[],
|
|
|
|
),
|
|
|
|
},
|
|
|
|
),
|
|
|
|
Expr(
|
|
|
|
WhileLoop {
|
|
|
|
test: BinOp {
|
|
|
|
typ: Gt,
|
|
|
|
left: Path(
|
|
|
|
Path(
|
|
|
|
[
|
|
|
|
Ident(
|
|
|
|
"i",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
right: Literal(
|
|
|
|
Number(
|
|
|
|
Number {
|
|
|
|
val: 3,
|
|
|
|
base: 10,
|
|
|
|
signed: false,
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
},
|
|
|
|
body: Block(
|
|
|
|
[],
|
|
|
|
),
|
|
|
|
},
|
|
|
|
),
|
|
|
|
Expr(
|
|
|
|
InfLoop {
|
|
|
|
body: Block(
|
|
|
|
[],
|
|
|
|
),
|
|
|
|
},
|
|
|
|
),
|
|
|
|
],
|
2024-12-21 03:10:03 +00:00
|
|
|
),
|
|
|
|
structs: {},
|
|
|
|
enums: {},
|
|
|
|
types: {},
|
|
|
|
functions: {},
|
|
|
|
member_functions: {},
|
|
|
|
}
|