summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/Lexer.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2009-02-20 16:34:48 +0100
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2009-02-20 16:34:48 +0100
commitc5d600b1d64e22525757c0fd833e4612e6385fc4 (patch)
tree323ae859218c9664c0a1e1de4b7d69edd4ca752a /src/shared/cplusplus/Lexer.cpp
parentd9bc54ed75e14ba19ec00387bb24f78580904d01 (diff)
downloadqt-creator-c5d600b1d64e22525757c0fd833e4612e6385fc4.tar.gz
Fixed highlighting of comment closing element */
Was taking the wrong state, causing it to appear in Doxygen style instead of as a normal comment. Fix by Roberto Raggi
Diffstat (limited to 'src/shared/cplusplus/Lexer.cpp')
-rw-r--r--src/shared/cplusplus/Lexer.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/shared/cplusplus/Lexer.cpp b/src/shared/cplusplus/Lexer.cpp
index 4d0b2b6e80..abb0adacd8 100644
--- a/src/shared/cplusplus/Lexer.cpp
+++ b/src/shared/cplusplus/Lexer.cpp
@@ -197,6 +197,8 @@ void Lexer::scan_helper(Token *tok)
tok->offset = _currentChar - _firstChar;
if (_state == State_MultiLineComment || _state == State_MultiLineDoxyComment) {
+ const int originalState = _state;
+
if (! _yychar) {
tok->kind = T_EOF_SYMBOL;
return;
@@ -218,9 +220,8 @@ void Lexer::scan_helper(Token *tok)
if (! _scanCommentTokens)
goto _Lagain;
- else if (_state == State_MultiLineComment)
+ else if (originalState == State_MultiLineComment)
tok->kind = T_COMMENT;
-
else
tok->kind = T_DOXY_COMMENT;
return; // done