Mercurial > projects > dil
diff trunk/src/dil/ast/Parameters.d @ 791:5fe89bb8cbdd
Implemented syntax tree copying.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Tue, 26 Feb 2008 20:13:41 +0100 |
parents | 3b34f6a95a27 |
children |
line wrap: on
line diff
--- a/trunk/src/dil/ast/Parameters.d Mon Feb 25 03:37:20 2008 +0100 +++ b/trunk/src/dil/ast/Parameters.d Tue Feb 26 20:13:41 2008 +0100 @@ -7,6 +7,7 @@ import dil.ast.Node; import dil.ast.Type; import dil.ast.Expression; +import dil.ast.NodeCopier; import dil.lexer.Identifier; import dil.Enums; @@ -52,6 +53,8 @@ { return !!(stc & StorageClass.Variadic); } + + mixin(copyMethod); } /// Array of parameters. @@ -78,6 +81,8 @@ size_t length() { return children.length; } + + mixin(copyMethod); } /*~~~~~~~~~~~~~~~~~~~~~~ @@ -93,6 +98,7 @@ super(NodeCategory.Other); this.ident = ident; } + override abstract TemplateParameter copy(); } /// E.g.: (alias T) @@ -109,6 +115,7 @@ this.specType = specType; this.defType = defType; } + mixin(copyMethod); } /// E.g.: (T t) @@ -125,6 +132,7 @@ this.specType = specType; this.defType = defType; } + mixin(copyMethod); } // version(D2) @@ -143,6 +151,7 @@ this.specType = specType; this.defType = defType; } + mixin(copyMethod); } // } @@ -163,6 +172,7 @@ this.specValue = specValue; this.defValue = defValue; } + mixin(copyMethod); } /// E.g.: (T...) @@ -174,6 +184,7 @@ mixin(set_kind); this.ident = ident; } + mixin(copyMethod); } /// Array of template parameters. @@ -194,6 +205,8 @@ { return cast(TemplateParameter[])children; } + + mixin(copyMethod); } /// Array of template arguments. @@ -209,4 +222,6 @@ { addChild(argument); } + + mixin(copyMethod); }