From 2a59d2ae0c889fe6e4ac50a3f110b0103f880c15 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Sun, 14 Feb 2010 14:41:51 +0100 Subject: 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". --- src/plugins/cpptools/cppcodecompletion.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/plugins/cpptools/cppcodecompletion.h') diff --git a/src/plugins/cpptools/cppcodecompletion.h b/src/plugins/cpptools/cppcodecompletion.h index d4160ee3c1..0d98dfdf95 100644 --- a/src/plugins/cpptools/cppcodecompletion.h +++ b/src/plugins/cpptools/cppcodecompletion.h @@ -89,6 +89,7 @@ public: void setPartialCompletionEnabled(bool partialCompletionEnabled); private: + void addKeyword(const QString &text); void addKeywords(); void addMacros(const QString &fileName, const CPlusPlus::Snapshot &snapshot); void addMacros_helper(const CPlusPlus::Snapshot &snapshot, -- cgit v1.2.1