diff basic/Attribute.d @ 144:6e6355fb5f0f

- Parsing nested attributes. - Creating classes and interfaces in AST. - Updated AstPrinter to print attributes, classes and interfaces.
author Anders Johnsen <skabet@gmail.com>
date Mon, 21 Jul 2008 17:41:40 +0200
parents d76cc5cad4fc
children 6ec686d9c87d
line wrap: on
line diff
--- a/basic/Attribute.d	Mon Jul 21 01:05:20 2008 +0200
+++ b/basic/Attribute.d	Mon Jul 21 17:41:40 2008 +0200
@@ -94,13 +94,20 @@
         return e;
     }
 
-    void setStatic()    { att &= ~Static; }
-    void setFinal()     { att &= ~Final; }
-    void setConst()     { att &= ~Const; }
-    void setAbstract()  { att &= ~Abstract; }
-    void setOverride()  { att &= ~Override; }
-    void setDepracted() { att &= ~Depracted; }
-    void setAuto()      { att &= ~Auto; }
+    void setStatic()    { att |= Static; }
+    bool getStatic()    { return att & Static ? true : false; }
+    void setFinal()     { att |= Final; }
+    bool getFinal()     { return att & Final ? true : false; }
+    void setConst()     { att |= Const; }
+    bool getConst()     { return att & Const ? true : false; }
+    void setAbstract()  { att |= Abstract; }
+    bool getAbstract()  { return att & Abstract ? true : false; }
+    void setOverride()  { att |= Override; }
+    bool getOverride()  { return att & Override ? true : false; }
+    void setDepracted() { att |= Depracted; }
+    bool getDepracted() { return att & Depracted ? true : false; }
+    void setAuto()      { att |= Auto; }
+    bool getAuto()      { return att & Auto ? true : false; }
 
     char[] toString()
     {