summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/Lexer.cpp
diff options
context:
space:
mode:
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