diff options
author | nyamatongwe <unknown> | 2011-12-09 19:39:26 +1100 |
---|---|---|
committer | nyamatongwe <unknown> | 2011-12-09 19:39:26 +1100 |
commit | 328d2ff08fc565c63ca62c40d104169ff632ad02 (patch) | |
tree | 10032d704c4942712522cda3d166208a81b135c0 | |
parent | b1a8b1c12ebc3dd01f4cd2cb7aaf339075d8e6c4 (diff) | |
download | scintilla-mirror-328d2ff08fc565c63ca62c40d104169ff632ad02.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> |