Fix bugs, add propper tests

This commit is contained in:
2026-02-03 13:20:23 +02:00
parent 081ff9a27a
commit 4b61adea5d
58 changed files with 1103 additions and 285 deletions

View File

@@ -0,0 +1,70 @@
Program {
ast: Block(
[
Expr(
LocBox {
inner: If(
IfExpr {
test: LocBox {
inner: BinOp {
typ: Gt,
left: LocBox {
inner: Path(
Path(
[
Ident(
"i",
),
],
),
),
loc: Loc {
file: "parser/if-statements.mcl",
line: 2,
col: 5,
},
},
right: LocBox {
inner: Literal(
Number(
Number {
val: 3,
base: 10,
signed: false,
},
),
),
loc: Loc {
file: "parser/if-statements.mcl",
line: 2,
col: 9,
},
},
},
loc: Loc {
file: "parser/if-statements.mcl",
line: 2,
col: 7,
},
},
body: Block(
[],
),
else_if: None,
},
),
loc: Loc {
file: "parser/if-statements.mcl",
line: 2,
col: 3,
},
},
),
],
),
structs: {},
enums: {},
types: {},
functions: {},
member_functions: {},
}