summaryrefslogtreecommitdiff
path: root/shared/cplusplus/Lexer.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <qtc-committer@nokia.com>2008-12-10 13:27:59 +0100
committerRoberto Raggi <qtc-committer@nokia.com>2008-12-10 13:30:19 +0100
commit65f07aa2de0fa24430a6deccc72334dfe883174f (patch)
treeb2b393978bd4b428af507735cec104d0c76fa305 /shared/cplusplus/Lexer.cpp
parent824db4c6e70ad7b76662cd7e5d0bc7df14ad6628 (diff)
downloadqt-creator-65f07aa2de0fa24430a6deccc72334dfe883174f.tar.gz
Implemented support for C++ and iso646 operators.
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;