Mercurial > projects > dil
diff trunk/src/dil/semantic/Types.d @ 796:f7688996bf08
Added member symbol to class Type.
Fixed html_map.d to IE6.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Fri, 29 Feb 2008 19:25:21 +0100 |
parents | 8e252b7c1459 |
children | c24be8d4f6ab |
line wrap: on
line diff
--- a/trunk/src/dil/semantic/Types.d Fri Feb 29 03:04:15 2008 +0100 +++ b/trunk/src/dil/semantic/Types.d Fri Feb 29 19:25:21 2008 +0100 @@ -11,8 +11,9 @@ abstract class Type/* : Symbol*/ { - Type next; - TYP tid; /// The ID of the type. + Type next; /// The next type in the type structure. + TYP tid; /// The ID of the type. + Symbol symbol; /// Not null if this type has a symbol. this(){} @@ -40,6 +41,11 @@ { return sizeOf(); } + + bool hasSymbol() + { + return symbol !is null; + } } class TypeBasic : Type @@ -99,11 +105,10 @@ class TypeEnum : Type { - Symbol enumSymbol; - this(Symbol enumSymbol, Type baseType) + this(Symbol symbol, Type baseType) { super(baseType, TYP.Enum); - this.enumSymbol = enumSymbol; + this.symbol = symbol; } Type baseType() @@ -114,17 +119,19 @@ class TypeStruct : Type { - this() + this(Symbol symbol) { super(null, TYP.Struct); + this.symbol = symbol; } } class TypeClass : Type { - this() + this(Symbol symbol) { super(null, TYP.Class); + this.symbol = symbol; } }