Mercurial > projects > dil
diff trunk/src/dil/ast/Declarations.d @ 704:ff4643a4a97c
Wrote code for SemanticPass2.visit(MixinDeclaration).
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Mon, 28 Jan 2008 18:48:02 +0100 |
parents | b0732f766ba0 |
children | efa5fcb9aa14 |
line wrap: on
line diff
--- a/trunk/src/dil/ast/Declarations.d Sun Jan 27 20:51:19 2008 +0100 +++ b/trunk/src/dil/ast/Declarations.d Mon Jan 28 18:48:02 2008 +0100 @@ -616,9 +616,12 @@ class MixinDeclaration : Declaration { + /// IdExpression := IdentifierExpression | TemplateInstanceExpression + /// MixinTemplate := IdExpression ("." IdExpression)* Expression templateExpr; - Identifier* mixinIdent; - Expression argument; // mixin ( AssignExpression ) + Identifier* mixinIdent; /// Optional mixin identifier. + Expression argument; /// "mixin" "(" AssignExpression ")" + Declaration decls; /// Initialized in the semantic phase. this(Expression templateExpr, Identifier* mixinIdent) { @@ -636,4 +639,9 @@ this.argument = argument; } + + bool isMixinExpression() + { + return argument !is null; + } }