From c5d600b1d64e22525757c0fd833e4612e6385fc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Fri, 20 Feb 2009 16:34:48 +0100 Subject: 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 --- src/shared/cplusplus/Lexer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/shared/cplusplus/Lexer.cpp') 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 -- cgit v1.2.1