From 328d2ff08fc565c63ca62c40d104169ff632ad02 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 9 Dec 2011 19:39:26 +1100 Subject: =?UTF-8?q?Highlight=20column=20numbers=20in=20GCC-style=20diagnos?= =?UTF-8?q?tic=20lines.=20Feature=20#3453075.=20From=20Jakub=20Vr=C3=A1na.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lexers/LexOthers.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lexers/LexOthers.cxx b/lexers/LexOthers.cxx index 720d97930..5f4eaed2d 100644 --- a/lexers/LexOthers.cxx +++ b/lexers/LexOthers.cxx @@ -1015,7 +1015,7 @@ static int RecogniseErrorListLine(const char *lineBuffer, unsigned int lengthLin bool initialTab = (lineBuffer[0] == '\t'); bool initialColonPart = false; enum { stInitial, - stGccStart, stGccDigit, stGcc, + stGccStart, stGccDigit, stGccColumn, stGcc, stMsStart, stMsDigit, stMsBracket, stMsVc, stMsDigitComma, stMsDotNet, stCtagsStart, stCtagsStartString, stCtagsStringDollar, stCtags, stUnrecognized @@ -1047,12 +1047,18 @@ static int RecogniseErrorListLine(const char *lineBuffer, unsigned int lengthLin state = Is1To9(ch) ? stGccDigit : stUnrecognized; } else if (state == stGccDigit) { // : if (ch == ':') { - state = stGcc; // :9.*: is GCC + state = stGccColumn; // :9.*: is GCC startValue = i + 1; - break; } else if (!Is0To9(ch)) { state = stUnrecognized; } + } else if (state == stGccColumn) { // :: + if (!Is0To9(ch)) { + state = stGcc; + if (ch == ':') + startValue = i + 1; + break; + } } else if (state == stMsStart) { // ( state = Is0To9(ch) ? stMsDigit : stUnrecognized; } else if (state == stMsDigit) { // ( -- cgit v1.2.3