The build system I am trting to make is for BlitzMax (blitzmax.com)
the build file is as;
{
"cmd": "bmk.bat", "release", "single", "fast", "console", "$file"],
"file_regex": "((?<=\\).*?(?=\\;))\\;([0-9]+)\\;([0-9]+)",
"selector": "source.BlitzMax"
}
The above calls a .bat file to compile (and run) the application, should an error occur when its compiled the output in the console looks like;
Compiling:TestProg2.bmx
Compile Error: Missing type specifier
[C:/Users/user account/My Projects/Sandbox/Sublime Text 2 blitzmax plugin/Example bmx Source/CompileTest/TestProg2.bmx;3;16]
Build Error: failed to compile C:/Users/user account/My Projects/Sandbox/Sublime Text 2 blitzmax plugin/Example bmx Source/CompileTest/TestProg2.bmx[Finished]
The regex I provided above does work a treat. When the error occurs after I build I can press F4 and the edit cursor is moved to the error in question.
As I understand it;
Group 1 of the file_regex shows the filename of the error
Group 2 of the file_regex shows the line number in that file
Group 3 of the file_regex shows the column in that file
Group 4 is the error message
Providing group 4 on the end like so;
"file_regex": "((?<=\\).*?(?=\\;))\\;([0-9]+)\\;([0-9]+)|(Compile Error: .*)",
Does not work as I expected it too.
Break down of the groups…
Group 1 = ((?<=\\).*?(?=\\;))
Group 2 = ([0-9]+)
Group 3 = ([0-9]+)
Group 4 = (Compile Error: .*)
Any idea how I can get the error message working.
As I understand it, when Group 4 is working as expected I should see the error message in the Status Bar of Sublime Text 2 when I press F4