summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/Keywords.cpp
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2010-12-08 15:08:03 +0100
committerChristian Kamm <christian.d.kamm@nokia.com>2011-01-04 15:58:22 +0100
commit16542241c91d6a4296bfbd18077de4eff1f43c8b (patch)
tree88a4487347d1802eefbb7c9690a52f95e38188d2 /src/shared/cplusplus/Keywords.cpp
parent40725cfd6db30ccb06239a3fb04de80f1e8d276e (diff)
downloadqt-creator-16542241c91d6a4296bfbd18077de4eff1f43c8b.tar.gz
C++: Add parsing of Q_PRIVATE_PROPERTY.
Reviewed-by: Roberto Raggi
Diffstat (limited to 'src/shared/cplusplus/Keywords.cpp')
-rw-r--r--src/shared/cplusplus/Keywords.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/shared/cplusplus/Keywords.cpp b/src/shared/cplusplus/Keywords.cpp
index 340f418547..ed32aeb021 100644
--- a/src/shared/cplusplus/Keywords.cpp
+++ b/src/shared/cplusplus/Keywords.cpp
@@ -1442,6 +1442,47 @@ static inline int classify14(const char *s, bool q, bool) {
return T_IDENTIFIER;
}
+static inline int classify18(const char *s, bool q, bool) {
+ if (q && s[0] == 'Q') {
+ if (s[1] == '_') {
+ if (s[2] == 'P') {
+ if (s[3] == 'R') {
+ if (s[4] == 'I') {
+ if (s[5] == 'V') {
+ if (s[6] == 'A') {
+ if (s[7] == 'T') {
+ if (s[8] == 'E') {
+ if (s[9] == '_') {
+ if (s[10] == 'P') {
+ if (s[11] == 'R') {
+ if (s[12] == 'O') {
+ if (s[13] == 'P') {
+ if (s[14] == 'E') {
+ if (s[15] == 'R') {
+ if (s[16] == 'T') {
+ if (s[17] == 'Y') {
+ return T_Q_PRIVATE_PROPERTY;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return T_IDENTIFIER;
+}
+
static inline int classify19(const char *s, bool q, bool) {
if (q && s[0] == 'Q') {
if (s[1] == '_') {
@@ -1502,6 +1543,7 @@ int Lexer::classify(const char *s, int n, bool q, bool x) {
case 13: return classify13(s, q, x);
case 14: return classify14(s, q, x);
case 16: return classify16(s, q, x);
+ case 18: return classify18(s, q, x);
case 19: return classify19(s, q, x);
default: return T_IDENTIFIER;
} // switch