C++: Recognize C++11 nullptr

Change-Id: I5b7ac8f9b2137ffe9439ada4ec4aeb9cee8e249d
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
Leandro Melo
2011-11-18 13:33:26 +01:00
parent 64d579dc3a
commit 057fad645b
20 changed files with 140 additions and 1 deletions

View File

@@ -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') {