Author: mhutch
Date: 2008-01-03 16:44:28 -0500 (Thu, 03 Jan 2008)
New Revision: 92208

Modified:
   trunk/monodevelop/main/src/addins/VBNetBinding/ChangeLog
   trunk/monodevelop/main/src/addins/VBNetBinding/VBBindingCompilerServices.cs
Log:
* VBBindingCompilerServices.cs: Update the compiler output parsing
  regex to handle all vbnc errors and correctly extract file and
  position info when present.

Modified: trunk/monodevelop/main/src/addins/VBNetBinding/ChangeLog
===================================================================
--- trunk/monodevelop/main/src/addins/VBNetBinding/ChangeLog    2008-01-03 
21:43:46 UTC (rev 92207)
+++ trunk/monodevelop/main/src/addins/VBNetBinding/ChangeLog    2008-01-03 
21:44:28 UTC (rev 92208)
@@ -1,3 +1,9 @@
+2008-01-03  Michael Hutchinson <[EMAIL PROTECTED]> 
+
+       * VBBindingCompilerServices.cs: Update the compiler output parsing 
regex to
+         handle all vbnc errors and correctly extract file and position info 
when
+         present.
+
 2008-01-02  Michael Hutchinson <[EMAIL PROTECTED]> 
 
        * Parser/Parser.cs: Merge some code from C# binding so that VB parser

Modified: 
trunk/monodevelop/main/src/addins/VBNetBinding/VBBindingCompilerServices.cs
===================================================================
--- trunk/monodevelop/main/src/addins/VBNetBinding/VBBindingCompilerServices.cs 
2008-01-03 21:43:46 UTC (rev 92207)
+++ trunk/monodevelop/main/src/addins/VBNetBinding/VBBindingCompilerServices.cs 
2008-01-03 21:44:28 UTC (rev 92208)
@@ -39,10 +39,13 @@
        /// This class controls the compilation of VB.net files and VB.net 
projects
        /// </summary>
        public class VBBindingCompilerServices
-       {       
-               static Regex regexError = new Regex 
(@"^(\s*(?<file>.*)\((?<line>\d*)(,(?<column>\d*))?\)\s+)*(?<level>\w+)\s*(?<number>.*):\s(?<message>.*)",
-               RegexOptions.Compiled | RegexOptions.ExplicitCapture);
-
+       {
+               //matches "/home/path/Default.aspx.vb (40,31) : Error 
VBNC30205: Expected end of statement."
+               //and "Error : VBNC99999: vbnc crashed nearby this location in 
the source code."
+               //and "Error : VBNC99999: Unexpected error: Object reference 
not set to an instance of an object" 
+               static Regex regexError = new Regex 
(@"^\s*((?<file>.*)\((?<line>\d*),(?<column>\d*)\) : )?(?<level>\w+) :? 
?(?<number>[^:]*): (?<message>.*)$",
+                                                    RegexOptions.Compiled | 
RegexOptions.ExplicitCapture);
+               
                public bool CanCompile(string fileName)
                {
                        return Path.GetExtension(fileName) == ".vb";

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to