summaryrefslogtreecommitdiff
path: root/src/libs/cplusplus/SimpleLexer.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@nokia.com>2010-02-14 14:41:51 +0100
committerErik Verbruggen <erik.verbruggen@nokia.com>2010-02-15 09:27:00 +0100
commit2a59d2ae0c889fe6e4ac50a3f110b0103f880c15 (patch)
treeff989d0d79fcee735d24bf88ef7552aa43aa1c7f /src/libs/cplusplus/SimpleLexer.cpp
parentabdd404ff5ec8539f0d3fd38139eb08ad8a03d66 (diff)
downloadqt-creator-2a59d2ae0c889fe6e4ac50a3f110b0103f880c15.tar.gz
Split Objective-C keyword parsing to handle the '@' separately.
Because apparently, while designing the Objective-C language, somebody thought it was a world-class idea to allow any white-space between the '@' character and the subsequent keyword. With this fix, we now correctly parse: @ dynamic and: @ selector and: @"foo" "bar" @"mooze" (This last one is 1 single string split over multiple lines.) Wonderful, isn't it? What we (and Clang) do not support, but what GCC supports is something like: @"foo"@@ "bar" @"mooze" @@ which is equivalent to @"foobarmooze".
Diffstat (limited to 'src/libs/cplusplus/SimpleLexer.cpp')
-rw-r--r--src/libs/cplusplus/SimpleLexer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/cplusplus/SimpleLexer.cpp b/src/libs/cplusplus/SimpleLexer.cpp
index 1af3bdb936..de5dca135e 100644
--- a/src/libs/cplusplus/SimpleLexer.cpp
+++ b/src/libs/cplusplus/SimpleLexer.cpp
@@ -71,7 +71,7 @@ bool SimpleToken::isComment() const
bool SimpleToken::isObjCAtKeyword() const
{
- return _kind >= T_FIRST_OBJC_AT_KEYWORD && _kind <= T_LAST_OBJC_AT_KEYWORD;
+ return _kind >= T_FIRST_OBJC_KEYWORD && _kind <= T_LAST_OBJC_KEYWORD;
}
const char *SimpleToken::name() const