Mercurial > projects > dil
diff trunk/src/dil/ast/Types.d @ 670:d8c32113afde
Added command 'translate'.
Added Undefined to enum NodeCategory.
Fixed ctor of QualifiedType.
Improved GermanTranslator.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Thu, 17 Jan 2008 22:28:04 +0100 |
parents | a1f8d8f2db38 |
children | f1325a4506de |
line wrap: on
line diff
--- a/trunk/src/dil/ast/Types.d Thu Jan 17 19:45:28 2008 +0100 +++ b/trunk/src/dil/ast/Types.d Thu Jan 17 22:28:04 2008 +0100 @@ -11,6 +11,7 @@ import dil.Enums; import dil.semantic.Types; +// Scheduled for deletion. enum TID { Void = TOK.Void, @@ -54,6 +55,7 @@ Invariant, // D2 } +/// The base class of all type nodes. abstract class TypeNode : Node { TID tid; @@ -74,6 +76,7 @@ } } +/// Illegal type. class UndefinedType : TypeNode { this() @@ -113,7 +116,9 @@ this(TypeNode left, TypeNode right) { super(TID.Qualified, left); + mixin(set_kind); addChild(right); + this.right = right; } } @@ -127,6 +132,7 @@ } } +/// "typeof" "(" Expression ") class TypeofType : TypeNode { Expression e; @@ -137,6 +143,7 @@ this.e = e; } + /// D2.0: "typeof" "(" "return" ")" this() { super(TID.Typeof); @@ -149,6 +156,7 @@ } } +/// Identifier "!" "(" TemplateParameters? ")" class TemplateInstanceType : TypeNode { Identifier* ident; @@ -163,6 +171,7 @@ } } +/// Type * class PointerType : TypeNode { this(TypeNode t) @@ -236,6 +245,7 @@ } } +/// Type "(" BasicType2 Identifier ")" "(" Parameters? ")" class CFuncPointerType : TypeNode { Parameters params; @@ -247,7 +257,7 @@ } } -/// "class" Identifier : BaseClass +/// "class" Identifier : BaseClasses class BaseClassType : TypeNode { Protection prot; @@ -261,6 +271,7 @@ // version(D2) // { +/// "const" "(" Type ")" class ConstType : TypeNode { this(TypeNode t) @@ -271,6 +282,7 @@ } } +/// "invariant" "(" Type ")" class InvariantType : TypeNode { this(TypeNode t)