diff trunk/src/dil/TypeSystem.d @ 560:709e223a8eb9

Added code related to symbols. Added class ScopeSymbol. Module inherits from ScopeSymbol now. Added methods classScope() and moduleScope(), and member symbol to class Scope. Added enum SYM. Added member sid to class Symbol. Aggregate and Function inherit from ScopeSymbol now. Added Error to struct Types.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Wed, 26 Dec 2007 14:17:01 +0100
parents faf16f4e7fc8
children
line wrap: on
line diff
--- a/trunk/src/dil/TypeSystem.d	Mon Dec 24 20:39:14 2007 +0100
+++ b/trunk/src/dil/TypeSystem.d	Wed Dec 26 14:17:01 2007 +0100
@@ -18,6 +18,8 @@
 
   this(Type next, TYP tid)
   {
+    this.sid = SYM.Type;
+
     this.next = next;
     this.tid = tid;
   }
@@ -295,7 +297,7 @@
 
   TypeBasic Size_t, Ptrdiff_t;
   TypePointer Void_ptr;
-  TypeBasic Undefined;
+  TypeBasic Error, Undefined;
 
   /// Allocates an instance of TypeBasic and assigns it to typeName.
   template newTB(char[] typeName)
@@ -340,6 +342,7 @@
       Ptrdiff_t = Int;
     }
     Void_ptr = Void.ptrTo;
+    Error = new TypeBasic(TYP.Error);
     Undefined = new TypeBasic(TYP.Error);
   }
 }