diff ast/Exp.d @ 93:621cedba53ea new_gen

Removed the Symbol from semantics - it was not needed anymore. From now on you set the type by doing a setType on an Identifier.
author Anders Johnsen <skabet@gmail.com>
date Mon, 05 May 2008 20:53:13 +0200
parents 771ac63898e2
children 438e6ed4cda1
line wrap: on
line diff
--- a/ast/Exp.d	Mon May 05 18:44:20 2008 +0200
+++ b/ast/Exp.d	Mon May 05 20:53:13 2008 +0200
@@ -107,7 +107,7 @@
             auto i = new Identifier("temp.var");
             i.env = f.env;
             f.env.add(i);
-            f.env.find(i).type = t;
+            f.env.find(i).setType(t);
             auto ty = new Identifier(t.name);
             auto var = new VarDecl(ty, i, null);
             Exp[] args; 
@@ -530,6 +530,11 @@
         return this;
     }
 
+    void setType(DType myType)
+    {
+        this.myType = myType;
+    }
+
     char[] name;
     private DType myType;
 }