diff trunk/src/dil/ast/Types.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 5e3ef1b2011c
children 9e6c6bb73e5f
line wrap: on
line diff
--- a/trunk/src/dil/ast/Types.d	Mon Feb 25 03:37:20 2008 +0100
+++ b/trunk/src/dil/ast/Types.d	Tue Feb 26 20:13:41 2008 +0100
@@ -8,6 +8,7 @@
 import dil.ast.Node;
 import dil.ast.Expression;
 import dil.ast.Parameters;
+import dil.ast.NodeCopier;
 import dil.lexer.Identifier;
 import dil.semantic.Types;
 import dil.Enums;
@@ -19,6 +20,7 @@
   {
     mixin(set_kind);
   }
+  mixin(copyMethod);
 }
 
 /// char, int, float etc.
@@ -30,6 +32,7 @@
     mixin(set_kind);
     this.tok = tok;
   }
+  mixin(copyMethod);
 }
 
 /// Identifier
@@ -41,6 +44,7 @@
     mixin(set_kind);
     this.ident = ident;
   }
+  mixin(copyMethod);
 }
 
 /// Type "." Type
@@ -55,6 +59,7 @@
     addChild(rhs);
     this.rhs = rhs;
   }
+  mixin(copyMethod);
 }
 
 /// "." Type
@@ -65,6 +70,7 @@
     super(next);
     mixin(set_kind);
   }
+  mixin(copyMethod);
 }
 
 /// "typeof" "(" Expression ")" or$(BR)
@@ -89,6 +95,8 @@
   {
     return e is null;
   }
+
+  mixin(copyMethod);
 }
 
 /// Identifier "!" "(" TemplateParameters? ")"
@@ -103,6 +111,7 @@
     this.ident = ident;
     this.targs = targs;
   }
+  mixin(copyMethod);
 }
 
 /// Type *
@@ -113,6 +122,7 @@
     super(next);
     mixin(set_kind);
   }
+  mixin(copyMethod);
 }
 
 /// Dynamic array: T[] or$(BR)
@@ -165,6 +175,8 @@
   {
     return assocType !is null;
   }
+
+  mixin(copyMethod);
 }
 
 /// ReturnType "function" "(" Parameters? ")"
@@ -179,6 +191,7 @@
     addChild(params);
     this.params = params;
   }
+  mixin(copyMethod);
 }
 
 /// ReturnType "delegate" "(" Parameters? ")"
@@ -193,6 +206,7 @@
     addChild(params);
     this.params = params;
   }
+  mixin(copyMethod);
 }
 
 /// Type "(" BasicType2 Identifier ")" "(" Parameters? ")"
@@ -205,6 +219,7 @@
     mixin(set_kind);
     addOptChild(params);
   }
+  mixin(copyMethod);
 }
 
 /// "class" Identifier : BaseClasses
@@ -217,6 +232,7 @@
     mixin(set_kind);
     this.prot = prot;
   }
+  mixin(copyMethod);
 }
 
 // version(D2)
@@ -230,6 +246,7 @@
     super(next);
     mixin(set_kind);
   }
+  mixin(copyMethod);
 }
 
 /// "invariant" "(" Type ")"
@@ -241,5 +258,6 @@
     super(next);
     mixin(set_kind);
   }
+  mixin(copyMethod);
 }
 // } // version(D2)