Mercurial > projects > dil
diff trunk/src/dil/ast/Types.d @ 618:07946b379006
Refactored the way dot expressions are parsed.
DotExpression is a binary expression now.
Added ModuleScopeExpression.
Removed some obsolete expression classes.
Added QualifiedType and ModuleScopeType.
Removed some obsolete type node classes.
Added genAnonymousID() to IdTable.
Removed obsolete parser functions.
Improved Node.getDocComments().
Added semantic() methods to some declaration classes.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Fri, 11 Jan 2008 00:42:35 +0100 |
parents | fac9e8b258fc |
children | b2fc028d8b55 |
line wrap: on
line diff
--- a/trunk/src/dil/ast/Types.d Thu Jan 10 19:47:34 2008 +0100 +++ b/trunk/src/dil/ast/Types.d Fri Jan 11 00:42:35 2008 +0100 @@ -45,8 +45,8 @@ Pointer, CFuncPointer, Array, - Dot, - DotList, + Qualified, + ModuleScope, Identifier, Typeof, TemplateInstance, @@ -78,15 +78,6 @@ } } -class IntegralType : TypeNode -{ - this(TOK tok) - { - super(cast(TID)tok); - mixin(set_kind); - } -} - class UndefinedType : TypeNode { this() @@ -96,15 +87,12 @@ } } -class DotListType : TypeNode +class IntegralType : TypeNode { - TypeNode[] dotList; - this(TypeNode[] dotList) + this(TOK tok) { - super(TID.DotList); + super(cast(TID)tok); mixin(set_kind); - addChildren(dotList); - this.dotList = dotList; } } @@ -119,11 +107,22 @@ } } -class DotType : TypeNode +class QualifiedType : TypeNode { - this() + alias next left; + TypeNode right; + this(TypeNode left, TypeNode right) { - super(TID.Dot); + super(TID.Qualified, left); + addChild(right); + } +} + +class ModuleScopeType : TypeNode +{ + this(TypeNode next) + { + super(TID.ModuleScope, next); mixin(set_kind); } }