aboutsummaryrefslogtreecommitdiff
path: root/TypeRules.hs
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-09-01 18:14:43 +0200
committertomsmeding <tom.smeding@gmail.com>2017-09-01 18:15:25 +0200
commit19c70b8eaa1126f1648b009d99092432a5c88059 (patch)
treebd4171a4d6ef5e8ae2b09e1c84bf3e2346374e97 /TypeRules.hs
parent3d5d85e00f2a81efb62bb17f8e5db63fe5a49a61 (diff)
Structs + typedefs
Diffstat (limited to 'TypeRules.hs')
-rw-r--r--TypeRules.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/TypeRules.hs b/TypeRules.hs
index 2bafe63..b73daf2 100644
--- a/TypeRules.hs
+++ b/TypeRules.hs
@@ -1,5 +1,7 @@
module TypeRules where
+import Data.List
+
import AST
@@ -53,6 +55,7 @@ instance TypeOf Expression where
typeof (EUn _ _ mt) = mt
typeof (ELit _ mt) = mt
typeof (ESubscript _ _ mt) = mt
+ typeof (EGet _ _ mt) = mt
typeof (ECast t _) = Just t
typeof (ENew t _) = Just $ TArr t Nothing