Mercurial > projects > dil
diff trunk/src/dil/Types.d @ 492:9c208925a3d4
Added module ImportParser and new stuff from DMD2.008.
Moved ImportParser from module Parser to its own module. Added a few methods
from class Parser and simplified them. Now protection attributes are taken into
consideration as well.
Added class TemplateThisParameter. Adapted TypeofType so that typeof(return)
can be recognized.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Thu, 06 Dec 2007 22:19:55 +0100 |
parents | a7291d3ee9d7 |
children | b60450804b6e |
line wrap: on
line diff
--- a/trunk/src/dil/Types.d Tue Dec 04 23:33:13 2007 +0100 +++ b/trunk/src/dil/Types.d Thu Dec 06 22:19:55 2007 +0100 @@ -179,6 +179,24 @@ } } +version(D2) +{ +class TemplateThisParameter : TemplateParameter +{ + Token* ident; + Type specType, defType; + this(Token* ident, Type specType, Type defType) + { + mixin(set_kind); + addOptChild(specType); + addOptChild(defType); + this.ident = ident; + this.specType = specType; + this.defType = defType; + } +} +} + class TemplateValueParameter : TemplateParameter { Type valueType; @@ -354,10 +372,20 @@ Expression e; this(Expression e) { + this(); + addChild(e); + this.e = e; + } + + this() + { super(TID.Typeof); mixin(set_kind); - addChild(e); - this.e = e; + } + + bool isTypeofReturn() + { + return e is null; } }