Merge branch 'pattern-matching-with-typechecking' of github.com:bachelor-group-66-systemf/churf into pattern-matching-with-typechecking

This commit is contained in:
Rakarake 2023-04-27 15:09:45 +02:00
commit e19c809d5e

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