We got pattern matching on data types!

This commit is contained in:
Samuel Hammersberg 2023-03-29 14:31:24 +02:00
parent 2860d47f11
commit 100b7b113a
3 changed files with 58 additions and 40 deletions

View file

@ -225,7 +225,7 @@ llvmIrToString = go 0
(Alloca t) -> unwords ["alloca", toIr t, "\n"]
(Malloca t) ->
concat
[ "call ptr @malloc(i32 ", show t, ")"]
[ "call ptr @malloc(i32 ", show t, ")\n"]
(Store t1 val t2 (Ident id2)) ->
concat
[ "store ", toIr t1, " ", toIr val