Recognize Objective C @tokens.

This commit is contained in:
Roberto Raggi
2009-01-08 11:08:40 +01:00
parent 2d8af0709d
commit 57c10b601a
5 changed files with 97 additions and 2 deletions

View File

@@ -62,7 +62,7 @@ static const char *token_names[] = {
("<identifier>"), ("<int literal>"), ("<float literal>"), ("<char literal>"),
("<wide char literal>"), ("<string literal>"), ("<wide char literal>"),
("<angle string literal>"),
("<@string literal>"), ("<angle string literal>"),
("&"), ("&&"), ("&="), ("->"), ("->*"), ("^"), ("^="), (":"), ("::"),
(","), ("/"), ("/="), ("."), ("..."), (".*"), ("="), ("=="), ("!"),
@@ -84,8 +84,16 @@ static const char *token_names[] = {
("union"), ("unsigned"), ("using"), ("virtual"), ("void"),
("volatile"), ("wchar_t"), ("while"),
// gnu
("__attribute__"), ("__typeof__"),
// objc @keywords
("@catch"), ("@class"), ("@compatibility_alias"), ("@defs"), ("@dynamic"),
("@encode"), ("@end"), ("@finally"), ("@implementation"), ("@interface"),
("@not_keyword"), ("@optional"), ("@package"), ("@private"), ("@property"),
("@protected"), ("@protocol"), ("@public"), ("@required"), ("@selector"),
("@synchronized"), ("@synthesize"), ("@throw"), ("@try"),
("SIGNAL"), ("SLOT"), ("Q_SIGNALS"), ("Q_SLOTS")
};
@@ -118,6 +126,7 @@ const char *Token::spell() const
case T_FLOAT_LITERAL:
case T_CHAR_LITERAL:
case T_STRING_LITERAL:
case T_AT_STRING_LITERAL:
case T_ANGLE_STRING_LITERAL:
case T_WIDE_CHAR_LITERAL:
case T_WIDE_STRING_LITERAL: