Fix comment typo
[mono.git] / mcs / mcs / modifiers.cs
index af29d7b020c972e8cd3d7c2cc252570b562360e2..3edbed6ba8100199301d02a86c438388929257a6 100644 (file)
@@ -1,8 +1,22 @@
 //
-// modifiers.cs: Modifier handling.
-// 
+// modifiers.cs: Modifiers handling
+//
+// Authors: Miguel de Icaza (miguel@gnu.org)
+//          Marek Safar (marek.safar@gmail.com)
+//
+// Dual licensed under the terms of the MIT X11 or GNU GPL
+//
+// Copyright 2001, 2002, 2003 Ximian, Inc (http://www.ximian.com)
+// Copyright 2004-2010 Novell, Inc
+//
+
 using System;
+
+#if STATIC
+using IKVM.Reflection;
+#else
 using System.Reflection;
+#endif
 
 namespace Mono.CSharp
 {
@@ -23,13 +37,14 @@ namespace Mono.CSharp
                EXTERN    = 0x0800,
                VOLATILE  = 0x1000,
                UNSAFE    = 0x2000,
-               TOP       = 0x4000,
+               ASYNC     = 0x4000,
+               TOP       = 0x8000,
 
                //
                // Compiler specific flags
                //
-               PROPERTY_CUSTOM                 = 0x4000,
-               OVERRIDE_UNCHECKED              = 0x8000,
+               PROPERTY_CUSTOM                 = 0x10000,
+
                PARTIAL                                 = 0x20000,
                DEFAULT_ACCESS_MODIFER  = 0x40000,
                METHOD_EXTENSION                = 0x80000,
@@ -94,6 +109,8 @@ namespace Mono.CSharp
                                s = "volatile"; break;
                        case Modifiers.UNSAFE:
                                s = "unsafe"; break;
+                       case Modifiers.ASYNC:
+                               s = "async"; break;
                        }
 
                        return s;
@@ -249,15 +266,16 @@ namespace Mono.CSharp
                                if ((i & invalid_flags) == 0)
                                        continue;
 
-                               Error_InvalidModifier (l, Name ((Modifiers) i), Report);
+                               Error_InvalidModifier ((Modifiers)i, l, Report);
                        }
 
                        return allowed & mod;
                }
 
-               public static void Error_InvalidModifier (Location l, string name, Report Report)
+               static void Error_InvalidModifier (Modifiers mod, Location l, Report Report)
                {
-                       Report.Error (106, l, "The modifier `{0}' is not valid for this item", name);
+                       Report.Error (106, l, "The modifier `{0}' is not valid for this item",
+                               Name (mod));
                }
        }
 }