FreeBSD/contrib/gcc/cp/parser.c
/* Parse an Objective-C protocol declaration.  */
Parse an Objective-C protocol declaration.
Parse an Objective - C protocol declaration .
static void
cp_parser_objc_protocol_declaration (cp_parser* parser, tree attributes)
{
  tree proto, protorefs;
  cp_token *tok;
  cp_lexer_consume_token (parser->lexer);  
  if (cp_lexer_next_token_is_not (parser->lexer, CPP_NAME))
    {
      error ("identifier expected after %<@protocol%>");
      goto finish;
    }
  tok = cp_lexer_peek_nth_token (parser->lexer, 2);
  if (tok->type == CPP_COMMA || tok->type == CPP_SEMICOLON)
    {
      objc_declare_protocols (cp_parser_objc_identifier_list (parser), attributes);
  finish:
      cp_parser_consume_semicolon_at_end_of_statement (parser);
    }
  else
    {
      proto = cp_parser_identifier (parser);
      protorefs = cp_parser_objc_protocol_refs_opt (parser);
      objc_start_protocol (proto, protorefs, attributes);
      cp_parser_objc_method_prototype_list (parser);
    }
}
static void cp_parser_objc_protocol_declaration ( cp_parser * parser , tree attributes ) { tree proto , protorefs ; cp_token * tok ; cp_lexer_consume_token ( parser -> lexer ) ; if ( cp_lexer_next_token_is_not ( parser -> lexer , CPP_NAME ) ) { error ( " " ) ; goto finish ; } tok = cp_lexer_peek_nth_token ( parser -> lexer , 2 ) ; if ( tok -> type == CPP_COMMA || tok -> type == CPP_SEMICOLON ) { objc_declare_protocols ( cp_parser_objc_identifier_list ( parser ) , attributes ) ; finish : cp_parser_consume_semicolon_at_end_of_statement ( parser ) ; } else { proto = cp_parser_identifier ( parser ) ; protorefs = cp_parser_objc_protocol_refs_opt ( parser ) ; objc_start_protocol ( proto , protorefs , attributes ) ; cp_parser_objc_method_prototype_list ( parser ) ; } }
Parse an Objective-C protocol declaration.
Parse an Objective - C protocol declaration .
/* APPLE LOCAL radar 4947311 */ /* Eat '@protocol'.  */ /* See if we have a forward declaration or a definition.  */ /* Try a forward declaration first.  */ /* APPLE LOCAL radar 4947311 */ /* Ok, we got a full-fledged definition (or at least should).  */ /* APPLE LOCAL radar 4947311 */