diff options
author | nyamatongwe <devnull@localhost> | 2011-12-09 19:39:26 +1100 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2011-12-09 19:39:26 +1100 |
commit | 9cc8d1972a75ae270c03b694882510a96fb05451 (patch) | |
tree | 9336e5cea25d671667216de3ba1576a2f3d4ab25 | |
parent | d36985627c2811ee5753730a1abde86e84640974 (diff) | |
download | scintilla-mirror-9cc8d1972a75ae270c03b694882510a96fb05451.tar.gz |
Highlight column numbers in GCC-style diagnostic lines. Feature #3453075.
From Jakub Vrána.
-rw-r--r-- | lexers/LexOthers.cxx | 12 |
1 files 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) { // <filename>:<line> 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) { // <filename>:<line>:<column> + if (!Is0To9(ch)) { + state = stGcc; + if (ch == ':') + startValue = i + 1; + break; + } } else if (state == stMsStart) { // <filename>( state = Is0To9(ch) ? stMsDigit : stUnrecognized; } else if (state == stMsDigit) { // <filename>(<line> |