Mercurial > projects > dil
diff trunk/src/dil/Expressions.d @ 505:3bb94ba21490
Refactored a great amount of code.
Changed many declaration types from Token* to Identifier*.
Fix in parseStructInitializer(): append null to idents in else body.
Fixed class Parameter and parseParameterList().
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Wed, 12 Dec 2007 02:25:42 +0100 |
parents | 4e14cd1b24da |
children | aa73f669c298 |
line wrap: on
line diff
--- a/trunk/src/dil/Expressions.d Tue Dec 11 17:02:42 2007 +0100 +++ b/trunk/src/dil/Expressions.d Wed Dec 12 02:25:42 2007 +0100 @@ -583,8 +583,8 @@ class IdentifierExpression : Expression { - Token* identifier; - this(Token* identifier) + Identifier* identifier; + this(Identifier* identifier) { mixin(set_kind); this.identifier = identifier; @@ -633,9 +633,9 @@ class TemplateInstanceExpression : Expression { - Token* ident; + Identifier* ident; TemplateArguments targs; - this(Token* ident, TemplateArguments targs) + this(Identifier* ident, TemplateArguments targs) { mixin(set_kind); addOptChild(targs); @@ -828,8 +828,8 @@ class TypeDotIdExpression : Expression { Type type; - Token* ident; - this(Type type, Token* ident) + Identifier* ident; + this(Type type, Identifier* ident) { mixin(set_kind); addChild(type); @@ -852,11 +852,12 @@ class IsExpression : Expression { Type type; - Token* ident; + Identifier* ident; Token* opTok, specTok; Type specType; TemplateParameters tparams; // D 2.0 - this(Type type, Token* ident, Token* opTok, Token* specTok, Type specType, typeof(tparams) tparams) + this(Type type, Identifier* ident, Token* opTok, Token* specTok, + Type specType, typeof(tparams) tparams) { mixin(set_kind); addChild(type); @@ -905,7 +906,7 @@ { class TraitsExpression : Expression { - Token* ident; + Identifier* ident; TemplateArguments targs; this(typeof(ident) ident, typeof(targs) targs) { @@ -945,9 +946,9 @@ class StructInitializer : Expression { - Token*[] idents; + Identifier*[] idents; Expression[] values; - this(Token*[] idents, Expression[] values) + this(Identifier*[] idents, Expression[] values) { mixin(set_kind); addOptChildren(values);