diff trunk/src/dil/semantic/Types.d @ 617:0749f30ef2d0

Added member 'EnumType type' to class Enum. Added method setType() to Enum. Fixed module name of src/dil/Types.d. Added member enumSymbol to EnumType. Removed 'TypeBasic' from newTB declaration.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Thu, 10 Jan 2008 19:47:34 +0100
parents a05457530ac2
children 839c0c61af2b
line wrap: on
line diff
--- a/trunk/src/dil/semantic/Types.d	Wed Jan 09 17:41:22 2008 +0100
+++ b/trunk/src/dil/semantic/Types.d	Thu Jan 10 19:47:34 2008 +0100
@@ -2,9 +2,9 @@
   Author: Aziz Köksal
   License: GPL3
 +/
-module dil.semantic.Type;
+module dil.semantic.Types;
 
-import dil.semantic.Symbol;
+import dil.semantic.Symbols;
 import dil.semantic.TypesEnum;
 import dil.lexer.Identifier;
 import dil.CompilerInfo;
@@ -96,9 +96,11 @@
 
 class EnumType : Type
 {
-  this(Type baseType)
+  Enum enumSymbol;
+  this(Enum enumSymbol, Type baseType)
   {
     super(baseType, TYP.Enum);
+    this.enumSymbol = enumSymbol;
   }
 
   Type baseType()
@@ -302,7 +304,7 @@
   /// Allocates an instance of TypeBasic and assigns it to typeName.
   template newTB(char[] typeName)
   {
-    const TypeBasic newTB = mixin(typeName~" = new TypeBasic(TYP."~typeName~")");
+    const newTB = mixin(typeName~" = new TypeBasic(TYP."~typeName~")");
   }
 
   static this()