Fix bugs, add propper tests
This commit is contained in:
70
old_tests/parser/if-statements.exp
Normal file
70
old_tests/parser/if-statements.exp
Normal 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: {},
|
||||
}
|
||||
Reference in New Issue
Block a user