2024-12-21 03:10:03 +00:00
|
|
|
Program {
|
|
|
|
ast: Block(
|
2024-12-21 21:09:10 +00:00
|
|
|
[
|
|
|
|
Expr(
|
2024-12-22 00:17:43 +00:00
|
|
|
LocBox {
|
2024-12-22 00:01:04 +00:00
|
|
|
inner: ForLoop {
|
|
|
|
init: Statement(
|
2024-12-22 00:17:43 +00:00
|
|
|
LocBox {
|
2024-12-22 00:01:04 +00:00
|
|
|
inner: Let {
|
|
|
|
name: Ident(
|
|
|
|
"i",
|
|
|
|
),
|
|
|
|
typ: None,
|
|
|
|
val: Some(
|
2024-12-22 00:17:43 +00:00
|
|
|
LocBox {
|
2024-12-22 00:01:04 +00:00
|
|
|
inner: Literal(
|
|
|
|
Number(
|
|
|
|
Number {
|
|
|
|
val: 0,
|
|
|
|
base: 10,
|
|
|
|
signed: false,
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
loc: Loc {
|
|
|
|
file: "parser/loops.mcl",
|
|
|
|
line: 1,
|
|
|
|
col: 14,
|
|
|
|
},
|
2024-12-21 21:09:10 +00:00
|
|
|
},
|
|
|
|
),
|
2024-12-22 00:01:04 +00:00
|
|
|
},
|
|
|
|
loc: Loc {
|
|
|
|
file: "parser/loops.mcl",
|
|
|
|
line: 1,
|
|
|
|
col: 8,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
),
|
2024-12-22 00:17:43 +00:00
|
|
|
test: LocBox {
|
2024-12-22 00:01:04 +00:00
|
|
|
inner: BinOp {
|
|
|
|
typ: Lt,
|
2024-12-22 00:17:43 +00:00
|
|
|
left: LocBox {
|
2024-12-22 00:01:04 +00:00
|
|
|
inner: Path(
|
|
|
|
Path(
|
|
|
|
[
|
|
|
|
Ident(
|
|
|
|
"i",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
loc: Loc {
|
|
|
|
file: "parser/loops.mcl",
|
|
|
|
line: 1,
|
|
|
|
col: 17,
|
|
|
|
},
|
|
|
|
},
|
2024-12-22 00:17:43 +00:00
|
|
|
right: LocBox {
|
2024-12-22 00:01:04 +00:00
|
|
|
inner: Literal(
|
|
|
|
Number(
|
|
|
|
Number {
|
|
|
|
val: 10,
|
|
|
|
base: 10,
|
|
|
|
signed: false,
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
loc: Loc {
|
|
|
|
file: "parser/loops.mcl",
|
|
|
|
line: 1,
|
|
|
|
col: 22,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
loc: Loc {
|
|
|
|
file: "parser/loops.mcl",
|
|
|
|
line: 1,
|
|
|
|
col: 19,
|
|
|
|
},
|
2024-12-21 21:09:10 +00:00
|
|
|
},
|
2024-12-22 00:17:43 +00:00
|
|
|
on_loop: LocBox {
|
2024-12-22 00:01:04 +00:00
|
|
|
inner: BinOp {
|
|
|
|
typ: AddEq,
|
2024-12-22 00:17:43 +00:00
|
|
|
left: LocBox {
|
2024-12-22 00:01:04 +00:00
|
|
|
inner: Path(
|
|
|
|
Path(
|
|
|
|
[
|
|
|
|
Ident(
|
|
|
|
"i",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
2024-12-21 21:09:10 +00:00
|
|
|
),
|
2024-12-22 00:01:04 +00:00
|
|
|
loc: Loc {
|
|
|
|
file: "parser/loops.mcl",
|
|
|
|
line: 1,
|
|
|
|
col: 25,
|
|
|
|
},
|
2024-12-21 21:09:10 +00:00
|
|
|
},
|
2024-12-22 00:17:43 +00:00
|
|
|
right: LocBox {
|
2024-12-22 00:01:04 +00:00
|
|
|
inner: Literal(
|
|
|
|
Number(
|
|
|
|
Number {
|
|
|
|
val: 1,
|
|
|
|
base: 10,
|
|
|
|
signed: false,
|
|
|
|
},
|
|
|
|
),
|
2024-12-21 21:09:10 +00:00
|
|
|
),
|
2024-12-22 00:01:04 +00:00
|
|
|
loc: Loc {
|
|
|
|
file: "parser/loops.mcl",
|
|
|
|
line: 1,
|
|
|
|
col: 29,
|
|
|
|
},
|
2024-12-21 21:09:10 +00:00
|
|
|
},
|
2024-12-22 00:01:04 +00:00
|
|
|
},
|
|
|
|
loc: Loc {
|
|
|
|
file: "parser/loops.mcl",
|
|
|
|
line: 1,
|
|
|
|
col: 27,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
body: Block(
|
|
|
|
[],
|
2024-12-21 21:09:10 +00:00
|
|
|
),
|
|
|
|
},
|
2024-12-22 00:01:04 +00:00
|
|
|
loc: Loc {
|
|
|
|
file: "parser/loops.mcl",
|
|
|
|
line: 1,
|
|
|
|
col: 4,
|
|
|
|
},
|
2024-12-21 21:09:10 +00:00
|
|
|
},
|
|
|
|
),
|
|
|
|
Expr(
|
2024-12-22 00:17:43 +00:00
|
|
|
LocBox {
|
2024-12-22 00:01:04 +00:00
|
|
|
inner: WhileLoop {
|
2024-12-22 00:17:43 +00:00
|
|
|
test: LocBox {
|
2024-12-22 00:01:04 +00:00
|
|
|
inner: BinOp {
|
|
|
|
typ: Gt,
|
2024-12-22 00:17:43 +00:00
|
|
|
left: LocBox {
|
2024-12-22 00:01:04 +00:00
|
|
|
inner: Path(
|
|
|
|
Path(
|
|
|
|
[
|
|
|
|
Ident(
|
|
|
|
"i",
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
2024-12-21 21:09:10 +00:00
|
|
|
),
|
2024-12-22 00:01:04 +00:00
|
|
|
loc: Loc {
|
|
|
|
file: "parser/loops.mcl",
|
|
|
|
line: 2,
|
|
|
|
col: 8,
|
|
|
|
},
|
2024-12-21 21:09:10 +00:00
|
|
|
},
|
2024-12-22 00:17:43 +00:00
|
|
|
right: LocBox {
|
2024-12-22 00:01:04 +00:00
|
|
|
inner: Literal(
|
|
|
|
Number(
|
|
|
|
Number {
|
|
|
|
val: 3,
|
|
|
|
base: 10,
|
|
|
|
signed: false,
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
loc: Loc {
|
|
|
|
file: "parser/loops.mcl",
|
|
|
|
line: 2,
|
|
|
|
col: 12,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
loc: Loc {
|
|
|
|
file: "parser/loops.mcl",
|
|
|
|
line: 2,
|
|
|
|
col: 10,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
body: Block(
|
|
|
|
[],
|
2024-12-21 21:09:10 +00:00
|
|
|
),
|
|
|
|
},
|
2024-12-22 00:01:04 +00:00
|
|
|
loc: Loc {
|
|
|
|
file: "parser/loops.mcl",
|
|
|
|
line: 2,
|
|
|
|
col: 6,
|
|
|
|
},
|
2024-12-21 21:09:10 +00:00
|
|
|
},
|
|
|
|
),
|
|
|
|
Expr(
|
2024-12-22 00:17:43 +00:00
|
|
|
LocBox {
|
2024-12-22 00:01:04 +00:00
|
|
|
inner: InfLoop {
|
|
|
|
body: Block(
|
|
|
|
[],
|
|
|
|
),
|
|
|
|
},
|
|
|
|
loc: Loc {
|
|
|
|
file: "parser/loops.mcl",
|
|
|
|
line: 3,
|
|
|
|
col: 5,
|
|
|
|
},
|
2024-12-21 21:09:10 +00:00
|
|
|
},
|
|
|
|
),
|
|
|
|
],
|
2024-12-21 03:10:03 +00:00
|
|
|
),
|
|
|
|
structs: {},
|
|
|
|
enums: {},
|
|
|
|
types: {},
|
|
|
|
functions: {},
|
|
|
|
member_functions: {},
|
|
|
|
}
|