diff trunk/src/dil/ast/Declarations.d @ 650:eb490ba8dba0

Made AttributeDeclaration abstract.
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Tue, 15 Jan 2008 11:22:55 +0100
parents 4ae7b13aaac8
children 2a71e2f50e13
line wrap: on
line diff
--- a/trunk/src/dil/ast/Declarations.d	Tue Jan 15 11:11:03 2008 +0100
+++ b/trunk/src/dil/ast/Declarations.d	Tue Jan 15 11:22:55 2008 +0100
@@ -568,17 +568,13 @@
   }
 }
 
-class AttributeDeclaration : Declaration
+abstract class AttributeDeclaration : Declaration
 {
-  TOK attribute;
   Declaration decls;
-  this(TOK attribute, Declaration decls)
+  this(Declaration decls)
   {
     super.hasBody = true;
-    mixin(set_kind);
     addChild(decls);
-
-    this.attribute = attribute;
     this.decls = decls;
   }
 }
@@ -588,7 +584,7 @@
   Protection prot;
   this(Protection prot, Declaration decls)
   {
-    super(cast(TOK)0, decls);
+    super(decls);
     mixin(set_kind);
     this.prot = prot;
   }
@@ -597,9 +593,9 @@
 class StorageClassDeclaration : AttributeDeclaration
 {
   StorageClass storageClass;
-  this(StorageClass storageClass, TOK tok, Declaration decl)
+  this(StorageClass storageClass, Declaration decl)
   {
-    super(tok, decl);
+    super(decl);
     mixin(set_kind);
 
     this.storageClass = storageClass;
@@ -611,7 +607,7 @@
   LinkageType linkageType;
   this(LinkageType linkageType, Declaration decls)
   {
-    super(TOK.Extern, decls);
+    super(decls);
     mixin(set_kind);
 
     this.linkageType = linkageType;
@@ -623,7 +619,7 @@
   int size;
   this(int size, Declaration decls)
   {
-    super(TOK.Align, decls);
+    super(decls);
     mixin(set_kind);
     this.size = size;
   }
@@ -636,7 +632,7 @@
   this(Identifier* ident, Expression[] args, Declaration decls)
   {
     addOptChildren(args); // Add args before calling super().
-    super(TOK.Pragma, decls);
+    super(decls);
     mixin(set_kind);
 
     this.ident = ident;