Fixed a booleans not being outputted as literals.

This commit is contained in:
Samuel Hammersberg 2023-04-27 15:06:42 +02:00
parent 579153b679
commit 39d0650115

View file

@ -331,6 +331,8 @@ exprToValue = \case
(MIR.ELit i, _t) -> pure $ case i of
(MIR.LInt i) -> VInteger i
(MIR.LChar i) -> VChar $ ord i
(MIR.EVar (TIR.Ident "True"), _t) -> pure $ VInteger 1
(MIR.EVar (TIR.Ident "False"), _t) -> pure $ VInteger 0
(MIR.EVar name, t) -> do
funcs <- gets functions
cons <- gets constructors