Mercurial > projects > dil
comparison trunk/src/dil/Declarations.d @ 511:aa73f669c298
Renamed class Type to TypeNode.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Thu, 13 Dec 2007 21:23:41 +0100 |
parents | 3bb94ba21490 |
children | c4bb948e5cc1 |
comparison
equal
deleted
inserted
replaced
510:dd3ce87b3569 | 511:aa73f669c298 |
---|---|
208 } | 208 } |
209 | 209 |
210 class EnumDeclaration : Declaration | 210 class EnumDeclaration : Declaration |
211 { | 211 { |
212 Identifier* name; | 212 Identifier* name; |
213 Type baseType; | 213 TypeNode baseType; |
214 EnumMember[] members; | 214 EnumMember[] members; |
215 this(Identifier* name, Type baseType, EnumMember[] members, bool hasBody) | 215 this(Identifier* name, TypeNode baseType, EnumMember[] members, bool hasBody) |
216 { | 216 { |
217 super.hasBody = hasBody; | 217 super.hasBody = hasBody; |
218 mixin(set_kind); | 218 mixin(set_kind); |
219 addOptChild(baseType); | 219 addOptChild(baseType); |
220 addOptChildren(members); | 220 addOptChildren(members); |
379 } | 379 } |
380 } | 380 } |
381 | 381 |
382 class FunctionDeclaration : Declaration | 382 class FunctionDeclaration : Declaration |
383 { | 383 { |
384 Type returnType; | 384 TypeNode returnType; |
385 Identifier* funcName; | 385 Identifier* funcName; |
386 TemplateParameters tparams; | 386 TemplateParameters tparams; |
387 Parameters params; | 387 Parameters params; |
388 FunctionBody funcBody; | 388 FunctionBody funcBody; |
389 LinkageType linkageType; | 389 LinkageType linkageType; |
390 this(Type returnType, Identifier* funcName, TemplateParameters tparams, | 390 this(TypeNode returnType, Identifier* funcName, TemplateParameters tparams, |
391 Parameters params, FunctionBody funcBody) | 391 Parameters params, FunctionBody funcBody) |
392 { | 392 { |
393 super.hasBody = funcBody.funcBody !is null; | 393 super.hasBody = funcBody.funcBody !is null; |
394 mixin(set_kind); | 394 mixin(set_kind); |
395 addChild(returnType); | 395 addChild(returnType); |
410 } | 410 } |
411 } | 411 } |
412 | 412 |
413 class VariableDeclaration : Declaration | 413 class VariableDeclaration : Declaration |
414 { | 414 { |
415 Type type; | 415 TypeNode type; |
416 Identifier*[] idents; | 416 Identifier*[] idents; |
417 Expression[] values; | 417 Expression[] values; |
418 LinkageType linkageType; | 418 LinkageType linkageType; |
419 this(Type type, Identifier*[] idents, Expression[] values) | 419 this(TypeNode type, Identifier*[] idents, Expression[] values) |
420 { | 420 { |
421 mixin(set_kind); | 421 mixin(set_kind); |
422 addOptChild(type); | 422 addOptChild(type); |
423 foreach(value; values) | 423 foreach(value; values) |
424 addOptChild(value); | 424 addOptChild(value); |