diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2010-03-24 13:43:38 +0100 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2010-03-24 13:49:02 +0100 |
commit | a6b21aac50e8361a3f50a3685857e0d5dd8fd6dd (patch) | |
tree | 02df97ccd9bb70e27cd9bed847d03300bcc62167 /src/shared/cplusplus/Keywords.cpp | |
parent | 8329d7db943bef3f7929d3802fc31f60e314e179 (diff) | |
download | qt-creator-a6b21aac50e8361a3f50a3685857e0d5dd8fd6dd.tar.gz |
Recognize C++0x decltype.
Diffstat (limited to 'src/shared/cplusplus/Keywords.cpp')
-rw-r--r-- | src/shared/cplusplus/Keywords.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/shared/cplusplus/Keywords.cpp b/src/shared/cplusplus/Keywords.cpp index 94699c1745..1e25c5ecbe 100644 --- a/src/shared/cplusplus/Keywords.cpp +++ b/src/shared/cplusplus/Keywords.cpp @@ -745,7 +745,7 @@ static inline int classify7(const char *s, bool q, bool) { return T_IDENTIFIER; } -static inline int classify8(const char *s, bool q, bool) { +static inline int classify8(const char *s, bool q, bool x) { if (s[0] == '_') { if (s[1] == '_') { if (s[2] == 'i') { @@ -793,6 +793,23 @@ static inline int classify8(const char *s, bool q, bool) { } } } + else if (x && s[0] == 'd') { + if (s[1] == 'e') { + if (s[2] == 'c') { + if (s[3] == 'l') { + if (s[4] == 't') { + if (s[5] == 'y') { + if (s[6] == 'p') { + if (s[7] == 'e') { + return T___TYPEOF; + } + } + } + } + } + } + } + } else if (s[0] == 'e') { if (s[1] == 'x') { if (s[2] == 'p') { |