diff --git a/examples/corpus.m b/examples/corpus.m index 6ddac84..0f127d4 100644 --- a/examples/corpus.m +++ b/examples/corpus.m @@ -1343,6 +1343,39 @@ typedef id (*NSNumberAllocImp)(id receiver, SEL selector); typedef void (*mtl_failedMethodCallback)(Class, Method); +enum { + UITableViewCellStyleDefault, + UITableViewCellStyleValue1, + UITableViewCellStyleValue2, + UITableViewCellStyleSubtitle +}; + +typedef enum { + UITableViewCellStyleDefault, + UITableViewCellStyleValue1, + UITableViewCellStyleValue2, + UITableViewCellStyleSubtitle +} UITableViewCellStyle; + +typedef enum { + UITableViewCellStyleDefault, + UITableViewCellStyleValue1, + UITableViewCellStyleValue2, + UITableViewCellStyleSubtitle +}; + +typedef NSInteger UITableViewCellStyle; + + +// enum attr-spec-seq(optional) identifier(optional) { enumerator-list } +enum week{Mon, Tue, Wed}; // type specifier +enum week day; // declaration, "day" is the declarator + +// Every declaration of an enum or a typedef is a definition. +enum week{Mon, Tue, Wed}day; // declaring an enum variable + // "week{Mon, Tue, Wed}" is the type specifier + // "day" is the declarator + typedef NS_ENUM(NSUInteger, RLMSyncStopPolicy); typedef NS_ENUM(NSUInteger, SDAnimatedImagePlaybackMode) { @@ -1488,14 +1521,14 @@ typedef struct _AspectBlock { struct unarchive_list { int ifield; id *list; -}; // FIXME +}; @end struct type_s { SS may_recurse; id id_val; -}; +}; // FIXME struct Derived : type_s { }; diff --git a/queries/highlights.scm b/queries/highlights.scm index 41a7d9e..1e4eeec 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -50,8 +50,6 @@ "@throw" "@selector" "@encode" - "@available" - "__builtin_available" (private) (public) (protected) @@ -61,11 +59,9 @@ "NS_ENUM" "NS_ERROR_ENUM" "NS_OPTIONS" + "NS_SWIFT_NAME" (type_qualifier) (storage_class_specifier) - (attribute_specifier) - (class_interface_attribute_sepcifier) - (method_variadic_arguments_attribute_specifier) "NS_NOESCAPE" "const" "default" @@ -358,6 +354,12 @@ declarator: (identifier) @property "_unaligned" "__unaligned" "__declspec" + "__unused" + "__builtin_available" + "@available" + (attribute_specifier) + (class_interface_attribute_sepcifier) + (method_variadic_arguments_attribute_specifier) ] @attribute (attribute_specifier) @attribute