diff lexer/Token.d @ 136:2be29b296081

Lots of changes: - Parsing classes and interfaces - Fixed some seg faults in sema - Supporting "private" to some extend - And a lot of other small fixes
author johnsen@johnsen-laptop
date Fri, 11 Jul 2008 21:47:57 +0200
parents c3b24e7e8cf8
children 927ae00bd9d2
line wrap: on
line diff
--- a/lexer/Token.d	Wed Jul 09 13:38:11 2008 +0200
+++ b/lexer/Token.d	Fri Jul 11 21:47:57 2008 +0200
@@ -76,6 +76,14 @@
     }
 
     /**
+      Returns true for all attributes( public, static, private...)
+     */
+    bool isBaseClassProtection()
+    {
+        return type >= Tok.Public && type <= Tok.Export;
+    }
+
+    /**
       just a shortcut to avoid `token.type == tok.Switch`.
      */
     bool isSwitch()
@@ -191,7 +199,7 @@
     Module, Import,
 
     /* Attributes */
-    Public, Private, Package, Protected, Export,
+    Public, Private, Package, Export, Protected,
     Static,
     Final,
     Const,