diff basic/Attribute.d @ 140:927ae00bd9d2

Added support for extern keyword. Being ignored atm though. Also changed ast/Module, so that you can get a list of only vars, functions or structs.
author Anders Johnsen <skabet@gmail.com>
date Sun, 20 Jul 2008 23:23:56 +0200
parents 2be29b296081
children d76cc5cad4fc
line wrap: on
line diff
--- a/basic/Attribute.d	Fri Jul 11 21:47:57 2008 +0200
+++ b/basic/Attribute.d	Sun Jul 20 23:23:56 2008 +0200
@@ -14,6 +14,16 @@
     Export    = 1<<4,
 }
 
+enum Extern : uint
+{
+    C         = 1<<12,
+    CPlusPlus = 1<<13,
+    D         = 1<<14,
+    Windows   = 1<<15,
+    Pascal    = 1<<16,
+    System    = 1<<17,
+}
+
 struct Attribute
 {
 
@@ -49,6 +59,11 @@
         return p;
     }
 
+    void setExtern(Extern e)    
+    { 
+        att &= ~e; 
+    }
+
     void setStatic()    { att &= ~Static; }
     void setFinal()     { att &= ~Final; }
     void setConst()     { att &= ~Const; }