aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/cplusplus/Keywords.cpp
diff options
context:
space:
mode:
authorLeandro Melo <leandro.melo@nokia.com>2011-11-18 13:33:26 +0100
committerLeandro Melo <leandro.melo@nokia.com>2011-11-18 13:50:19 +0100
commit057fad645bc16e8423579db6608120d59de40340 (patch)
treeb1d12874536678636b396a654c07c1613aabb518 /src/libs/3rdparty/cplusplus/Keywords.cpp
parent64d579dc3a72ac22acf66bdcc882850b1a5de773 (diff)
C++: Recognize C++11 nullptr
Change-Id: I5b7ac8f9b2137ffe9439ada4ec4aeb9cee8e249d Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src/libs/3rdparty/cplusplus/Keywords.cpp')
-rw-r--r--src/libs/3rdparty/cplusplus/Keywords.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/libs/3rdparty/cplusplus/Keywords.cpp b/src/libs/3rdparty/cplusplus/Keywords.cpp
index 003566c414..a87a4bd7a9 100644
--- a/src/libs/3rdparty/cplusplus/Keywords.cpp
+++ b/src/libs/3rdparty/cplusplus/Keywords.cpp
@@ -530,7 +530,7 @@ static inline int classify6(const char *s, bool q, bool) {
return T_IDENTIFIER;
}
-static inline int classify7(const char *s, bool q, bool) {
+static inline int classify7(const char *s, bool q, bool x) {
if (s[0] == '_') {
if (s[1] == '_') {
if (s[2] == 'a') {
@@ -587,6 +587,21 @@ static inline int classify7(const char *s, bool q, bool) {
}
}
}
+ else if (x && s[0] == 'n') {
+ if (s[1] == 'u') {
+ if (s[2] == 'l') {
+ if (s[3] == 'l') {
+ if (s[4] == 'p') {
+ if (s[5] == 't') {
+ if (s[6] == 'r') {
+ return T_NULLPTR;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
else if (s[0] == 'p') {
if (s[1] == 'r') {
if (s[2] == 'i') {