Mercurial > projects > dil
diff trunk/src/Expressions.d @ 289:a99357783c6f
- Fix: assign targs to member targs of TraitsExpression.
- Changed class FunctionLiteralExpression. Storing return type and parameters as members instead of funcType. Adapted parser accordingly.
author | aziz |
---|---|
date | Wed, 08 Aug 2007 11:35:03 +0000 |
parents | 833b301497f4 |
children | 418c6548ce17 |
line wrap: on
line diff
--- a/trunk/src/Expressions.d Wed Aug 08 10:46:02 2007 +0000 +++ b/trunk/src/Expressions.d Wed Aug 08 11:35:03 2007 +0000 @@ -775,16 +775,27 @@ class FunctionLiteralExpression : Expression { - FunctionType funcType; + Type returnType; + Parameters parameters; FunctionBody funcBody; - TOK funcTok; - this(FunctionType funcType, FunctionBody funcBody, TOK funcTok = TOK.Invalid) + this() { mixin(set_kind); - this.funcType = funcType; + } + + this(Type returnType, Parameters parameters, FunctionBody funcBody) + { + this(); + this.returnType = returnType; + this.parameters = parameters; this.funcBody = funcBody; - this.funcTok = funcTok; + } + + this(FunctionBody funcBody) + { + this(); + this.funcBody = funcBody; } } @@ -798,6 +809,7 @@ { mixin(set_kind); this.ident = ident; + this.targs = targs; } } }