Fixed a booleans not being outputted as literals.
This commit is contained in:
parent
579153b679
commit
39d0650115
1 changed files with 2 additions and 0 deletions
|
|
@ -331,6 +331,8 @@ exprToValue = \case
|
||||||
(MIR.ELit i, _t) -> pure $ case i of
|
(MIR.ELit i, _t) -> pure $ case i of
|
||||||
(MIR.LInt i) -> VInteger i
|
(MIR.LInt i) -> VInteger i
|
||||||
(MIR.LChar i) -> VChar $ ord 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
|
(MIR.EVar name, t) -> do
|
||||||
funcs <- gets functions
|
funcs <- gets functions
|
||||||
cons <- gets constructors
|
cons <- gets constructors
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue