Mercurial > projects > dil
comparison 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 |
comparison
equal
deleted
inserted
replaced
491:b991f49628a8 | 492:9c208925a3d4 |
---|---|
175 addOptChild(defType); | 175 addOptChild(defType); |
176 this.ident = ident; | 176 this.ident = ident; |
177 this.specType = specType; | 177 this.specType = specType; |
178 this.defType = defType; | 178 this.defType = defType; |
179 } | 179 } |
180 } | |
181 | |
182 version(D2) | |
183 { | |
184 class TemplateThisParameter : TemplateParameter | |
185 { | |
186 Token* ident; | |
187 Type specType, defType; | |
188 this(Token* ident, Type specType, Type defType) | |
189 { | |
190 mixin(set_kind); | |
191 addOptChild(specType); | |
192 addOptChild(defType); | |
193 this.ident = ident; | |
194 this.specType = specType; | |
195 this.defType = defType; | |
196 } | |
197 } | |
180 } | 198 } |
181 | 199 |
182 class TemplateValueParameter : TemplateParameter | 200 class TemplateValueParameter : TemplateParameter |
183 { | 201 { |
184 Type valueType; | 202 Type valueType; |
352 class TypeofType : Type | 370 class TypeofType : Type |
353 { | 371 { |
354 Expression e; | 372 Expression e; |
355 this(Expression e) | 373 this(Expression e) |
356 { | 374 { |
357 super(TID.Typeof); | 375 this(); |
358 mixin(set_kind); | |
359 addChild(e); | 376 addChild(e); |
360 this.e = e; | 377 this.e = e; |
378 } | |
379 | |
380 this() | |
381 { | |
382 super(TID.Typeof); | |
383 mixin(set_kind); | |
384 } | |
385 | |
386 bool isTypeofReturn() | |
387 { | |
388 return e is null; | |
361 } | 389 } |
362 } | 390 } |
363 | 391 |
364 class TemplateInstanceType : Type | 392 class TemplateInstanceType : Type |
365 { | 393 { |