summaryrefslogtreecommitdiff
path: root/shared/cplusplus/Lexer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'shared/cplusplus/Lexer.cpp')
-rw-r--r--shared/cplusplus/Lexer.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/shared/cplusplus/Lexer.cpp b/shared/cplusplus/Lexer.cpp
index af6f09f74d..2e9ae98c1e 100644
--- a/shared/cplusplus/Lexer.cpp
+++ b/shared/cplusplus/Lexer.cpp
@@ -589,8 +589,13 @@ void Lexer::scan_helper(Token *tok)
tok->kind = classify(yytext, yylen, _qtMocRunEnabled);
else
tok->kind = T_IDENTIFIER;
- if (tok->kind == T_IDENTIFIER && control())
- tok->identifier = control()->findOrInsertIdentifier(yytext, yylen);
+
+ if (tok->kind == T_IDENTIFIER) {
+ tok->kind = classifyOperator(yytext, yylen);
+
+ if (control())
+ tok->identifier = control()->findOrInsertIdentifier(yytext, yylen);
+ }
break;
} else if (std::isdigit(ch)) {
const char *yytext = _currentChar - 1;