summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/Keywords.cpp
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2009-11-30 16:30:21 +0100
committerRoberto Raggi <roberto.raggi@nokia.com>2009-11-30 17:07:22 +0100
commit527a9bd526d854d3f43b633a94af6dea642297db (patch)
treee334bb57c912b649551493dc985d2f0dd2e62a22 /src/shared/cplusplus/Keywords.cpp
parent5fc8324b8bb72ed5156ce52db2e6e506e568b405 (diff)
downloadqt-creator-527a9bd526d854d3f43b633a94af6dea642297db.tar.gz
Inital support for Q_D/Q_Q declarations.
Diffstat (limited to 'src/shared/cplusplus/Keywords.cpp')
-rw-r--r--src/shared/cplusplus/Keywords.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/shared/cplusplus/Keywords.cpp b/src/shared/cplusplus/Keywords.cpp
index 48af124473..6da25125f7 100644
--- a/src/shared/cplusplus/Keywords.cpp
+++ b/src/shared/cplusplus/Keywords.cpp
@@ -65,7 +65,7 @@ static inline int classify2(const char *s, bool) {
return T_IDENTIFIER;
}
-static inline int classify3(const char *s, bool) {
+static inline int classify3(const char *s, bool q) {
if (s[0] == 'a') {
if (s[1] == 's') {
if (s[2] == 'm') {
@@ -101,6 +101,16 @@ static inline int classify3(const char *s, bool) {
}
}
}
+ else if (q && s[0] == 'Q') {
+ if (s[1] == '_') {
+ if (s[2] == 'D') {
+ return T_Q_D;
+ }
+ else if (s[2] == 'Q') {
+ return T_Q_Q;
+ }
+ }
+ }
return T_IDENTIFIER;
}