2004-02-07 Tim Coleman <tim@timcoleman.com>
[mono.git] / mcs / mbas / module.cs
index cf0963dee326635b026b20b7e0b498429937aa5e..d16f54ed1090f8488d343ac9d8e214c38fb33a81 100644 (file)
@@ -1,27 +1,27 @@
-//\r
-// module.cs: Module handler\r
-//\r
-// Author: Rafael Teixeira (rafaelteixeirabr@hotmail.com)\r
-//\r
-// Licensed under the terms of the GNU GPL\r
-//\r
-// (C) 2002 Rafael Teixeira\r
-//\r
+//
+// module.cs: Module handler
+//
+// Author: Rafael Teixeira (rafaelteixeirabr@hotmail.com)
+//
+// Licensed under the terms of the GNU GPL
+//
+// (C) 2002 Rafael Teixeira
+//
 using System;
 using System.Collections;
 using System.Diagnostics.SymbolStore;
 using System.Reflection;
 using System.Reflection.Emit;
 using System.Runtime.CompilerServices;
-using Mono.CSharp ;
-\r
-namespace Mono.MonoBASIC\r
-{\r
-       public class Utils\r
-       {\r
-               public static void AddSpecializedAttribute(ref Attributes attrs, string attributeName, ArrayList args, Location loc)\r
-               {\r
-                       Mono.CSharp.Attribute specialAttr = new Mono.CSharp.Attribute(attributeName, args, loc);
+using Mono.MonoBASIC ;
+
+namespace Mono.MonoBASIC
+{
+       public class Utils
+       {
+               public static void AddSpecializedAttribute(ref Attributes attrs, string attributeName, ArrayList args, Location loc)
+               {
+                       Mono.MonoBASIC.Attribute specialAttr = new Mono.MonoBASIC.Attribute(attributeName, args, loc);
                        ArrayList al = new ArrayList();
                        al.Add(specialAttr);
                        AttributeSection asec = new AttributeSection(null, al);
@@ -29,20 +29,21 @@ namespace Mono.MonoBASIC
                                attrs = new Attributes(asec, loc);
                        else
                                attrs.AddAttribute(asec);
-               }\r
-       }\r
-       \r
-       /// <summary>\r
-       /// Summary description for module.\r
-       /// </summary>\r
-       public class Module : Mono.CSharp.Class \r
-       {\r
+               }
+       }
+       
+       /// <summary>
+       /// Summary description for module.
+       /// </summary>
+       public class Module : Mono.MonoBASIC.Class 
+       {
                // <summary>
                //   Modifiers allowed in a class declaration
                // </summary>
                public new const int AllowedModifiers =
                        Modifiers.PUBLIC |
-                       Modifiers.INTERNAL;
+                       Modifiers.INTERNAL
+                       ;
 
                public Module(TypeContainer parent, string name, int mod, Attributes attrs, Location l)
                        : base (parent, name, 0, null, l)
@@ -52,7 +53,7 @@ namespace Mono.MonoBASIC
                                        "'Module' statements can occur only at file or namespace level");
 
                        // overwrite ModFlags
-                       this.ModFlags = Modifiers.Check (AllowedModifiers, mod, Modifiers.INTERNAL, l) | Modifiers.SEALED;
+                       this.ModFlags = Modifiers.Check (AllowedModifiers, mod, Modifiers.INTERNAL, l);
 
                        // add specialized attribute
                        Utils.AddSpecializedAttribute(ref attrs, "Microsoft.VisualBasic.CompilerServices.StandardModuleAttribute", null, l);
@@ -63,12 +64,12 @@ namespace Mono.MonoBASIC
                // FIXME: How do we deal with the user specifying a different
                // layout?
                //
-               public override TypeAttributes TypeAttr \r
+               public override TypeAttributes TypeAttr 
                {
-                       get \r
+                       get 
                        {
-                               return base.TypeAttr | TypeAttributes.AutoLayout | TypeAttributes.Class;
+                               return base.TypeAttr | TypeAttributes.AutoLayout | TypeAttributes.Class | TypeAttributes.Sealed;
                        }
                }
        }
-}\r
+}