2002-11-16 Martin Baulig <martin@ximian.com>
[mono.git] / mcs / mcs / report.cs
index e76fc887c1bf184ef829147b785bd2663b016f66..2a3fc301f7b7fc8f3489ecba22acbfa4034536e8 100644 (file)
@@ -123,6 +123,18 @@ namespace Mono.CSharp {
                        Warning (code, Location.Null, text);
                }
 
+               static public void Warning (int code, int level, string text)
+               {
+                       if (RootContext.WarningLevel >= level)
+                               Warning (code, Location.Null, text);
+               }
+
+               static public void Warning (int code, int level, Location l, string text)
+               {
+                       if (RootContext.WarningLevel >= level)
+                               Warning (code, l, text);
+               }
+
                static public void Error (int code, string text)
                {
                        string msg = String.Format ("error CS{0:0000}: {1}", code, text);
@@ -181,7 +193,7 @@ namespace Mono.CSharp {
                                        if (first)
                                                first = false;
                                        else
-                                               sb.Append (",");
+                                               sb.Append (", ");
                                        if (arg == null)
                                                sb.Append ("null");
                                        else if (arg is ICollection)
@@ -206,7 +218,7 @@ namespace Mono.CSharp {
                                if (first)
                                        first = false;
                                else
-                                       sb.Append (",");
+                                       sb.Append (", ");
                                sb.Append (o);
                        }