diff options
author | Neil <nyamatongwe@gmail.com> | 2013-09-22 09:57:57 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2013-09-22 09:57:57 +1000 |
commit | b2224e19cb9bdd7b1d7344204e07cc3c1fd09a26 (patch) | |
tree | 87b7f7d6d966d02388a5626c8c995534368cfb2a | |
parent | 5bc0b4138858f4e81b40481230a47b1c1bef2d55 (diff) | |
download | scintilla-mirror-b2224e19cb9bdd7b1d7344204e07cc3c1fd09a26.tar.gz |
Stricter checking for ctags lines in errorlist lexer.
-rw-r--r-- | lexers/LexOthers.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lexers/LexOthers.cxx b/lexers/LexOthers.cxx index cdb4b3d17..f87e79275 100644 --- a/lexers/LexOthers.cxx +++ b/lexers/LexOthers.cxx @@ -954,15 +954,16 @@ static int RecogniseErrorListLine(const char *lineBuffer, unsigned int lengthLin // Common: <filename>(<line>): warning|error|note|remark|catastrophic|fatal // Common: <filename>(<line>) warning|error|note|remark|catastrophic|fatal // Microsoft: <filename>(<line>,<column>)<message> - // CTags: \t<message> + // CTags: <identifier>\t<filename>\t<message> // Lua 5 traceback: \t<filename>:<line>:<message> // Lua 5.1: <exe>: <filename>:<line>:<message> bool initialTab = (lineBuffer[0] == '\t'); bool initialColonPart = false; + bool canBeCtags = !initialTab; // For ctags must have an identifier with no spaces then a tab enum { stInitial, stGccStart, stGccDigit, stGccColumn, stGcc, stMsStart, stMsDigit, stMsBracket, stMsVc, stMsDigitComma, stMsDotNet, - stCtagsStart, stCtagsStartString, stCtagsStringDollar, stCtags, + stCtagsStart, stCtagsFile, stCtagsStartString, stCtagsStringDollar, stCtags, stUnrecognized } state = stInitial; for (unsigned int i = 0; i < lengthLine; i++) { @@ -984,9 +985,11 @@ static int RecogniseErrorListLine(const char *lineBuffer, unsigned int lengthLin // May be Microsoft // Check against '0' often removes phone numbers state = stMsStart; - } else if ((ch == '\t') && (!initialTab)) { + } else if ((ch == '\t') && canBeCtags) { // May be CTags state = stCtagsStart; + } else if (ch == ' ') { + canBeCtags = false; } } else if (state == stGccStart) { // <filename>: state = Is1To9(ch) ? stGccDigit : stUnrecognized; @@ -1047,6 +1050,10 @@ static int RecogniseErrorListLine(const char *lineBuffer, unsigned int lengthLin state = stUnrecognized; } } else if (state == stCtagsStart) { + if (ch == '\t') { + state = stCtagsFile; + } + } else if (state == stCtagsFile) { if ((lineBuffer[i - 1] == '\t') && ((ch == '/' && chNext == '^') || Is0To9(ch))) { state = stCtags; |