forked from qt-creator/qt-creator
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".
This commit is contained in:
@@ -218,13 +218,13 @@ int Semantic::visibilityForAccessSpecifier(int tokenKind) const
|
||||
int Semantic::visibilityForObjCAccessSpecifier(int tokenKind) const
|
||||
{
|
||||
switch (tokenKind) {
|
||||
case T_AT_PUBLIC:
|
||||
case T_PUBLIC:
|
||||
return Symbol::Public;
|
||||
case T_AT_PROTECTED:
|
||||
case T_PROTECTED:
|
||||
return Symbol::Protected;
|
||||
case T_AT_PRIVATE:
|
||||
case T_PRIVATE:
|
||||
return Symbol::Private;
|
||||
case T_AT_PACKAGE:
|
||||
case T_PACKAGE:
|
||||
return Symbol::Package;
|
||||
default:
|
||||
return Symbol::Protected;
|
||||
|
||||
Reference in New Issue
Block a user