diff --git a/grammar.js b/grammar.js index ee1fea7..5bcd4e9 100644 --- a/grammar.js +++ b/grammar.js @@ -485,7 +485,7 @@ module.exports = grammar(C, { field('return_type', optional($._method_argument_type_specifier)), field('selector', $._method_selector), optional($.attribute_specifier), - optional(';'), + optional(';'), // compatible with: - (void)method; {} field('body', $.compound_statement), optional(';'), ), @@ -498,12 +498,12 @@ module.exports = grammar(C, { ), ), - _unary_selector: $ => $.identifier, // naming + _unary_selector: $ => $.identifier, keyword_selector: $ => repeat1($.keyword_declarator), keyword_declarator: $ => prec.right(seq( - field('keyword', optional($.identifier)), // naming + field('keyword', optional($.identifier)), ':', field('type', optional($._method_argument_type_specifier)), $._name, diff --git a/src/grammar.json b/src/grammar.json index e46b81b..5e83d11 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -10058,17 +10058,8 @@ "value": "BOOL" }, "auto": { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "auto" - }, - { - "type": "STRING", - "value": "__auto_type" - } - ] + "type": "STRING", + "value": "__auto_type" }, "autoreleasepool_statement": { "type": "PREC_RIGHT", diff --git a/test/corpus/blocks.txt b/test/corpus/blocks.txt index 1a2c33f..751f98e 100644 --- a/test/corpus/blocks.txt +++ b/test/corpus/blocks.txt @@ -825,7 +825,7 @@ Blocks: as a instance variable parameters: (parameter_list))))) ================================================================================ -Blocks: unknown [FIXME] +Blocks: unknown ================================================================================ extern void use(id); diff --git a/test/corpus/types.txt b/test/corpus/types.txt index a500546..8820aeb 100644 --- a/test/corpus/types.txt +++ b/test/corpus/types.txt @@ -457,14 +457,14 @@ Struct struct unarchive_list { int ifield; id *list; -}; // FIXME +}; @end struct type_s { SS may_recurse; id id_val; -}; +}; // FIXME struct Derived : type_s { }; @@ -484,8 +484,7 @@ struct Derived : type_s { }; type: (id) declarator: (pointer_declarator declarator: (field_identifier))))) - declarator: (MISSING identifier)) - (comment)) + declarator: (MISSING identifier))) (struct_specifier name: (type_identifier) body: (field_declaration_list @@ -495,6 +494,7 @@ struct Derived : type_s { }; (field_declaration type: (id) declarator: (field_identifier)))) + (comment) (struct_specifier name: (type_identifier) (superclass_reference