FreeBSD/contrib/gcc/cp/parser.c
/* Parse an Objective-C declaration.  */
Parse an Objective-C declaration.
Parse an Objective - C declaration .
static void
cp_parser_objc_declaration (cp_parser* parser)
{
  cp_token *kwd = cp_lexer_peek_token (parser->lexer);
  switch (kwd->keyword)
    {
    case RID_AT_ALIAS:
      cp_parser_objc_alias_declaration (parser);
      break;
    case RID_AT_CLASS:
      cp_parser_objc_class_declaration (parser);
      break;
    case RID_AT_PROTOCOL:
      cp_parser_objc_protocol_declaration (parser, NULL_TREE);
      break;
    case RID_ATTRIBUTE:
      {
	tree attributes = NULL_TREE;
	cp_parser_objc_maybe_attributes (parser, &attributes);
	if (cp_lexer_peek_token (parser->lexer)->keyword == RID_AT_INTERFACE)
	  cp_parser_objc_class_interface (parser, attributes);
	else if (cp_lexer_peek_token (parser->lexer)->keyword == RID_AT_PROTOCOL)
	  cp_parser_objc_protocol_declaration (parser, attributes);
	break;
      }
    case RID_AT_INTERFACE:
      cp_parser_objc_class_interface (parser, NULL_TREE);
      break;
    case RID_AT_IMPLEMENTATION:
      cp_parser_objc_class_implementation (parser);
      break;
    case RID_AT_END:
      cp_parser_objc_end_implementation (parser);
      break;
    default:
      error ("misplaced %<@%D%> Objective-C++ construct", kwd->u.value);
      cp_parser_skip_to_end_of_block_or_statement (parser);
    }
}
static void cp_parser_objc_declaration ( cp_parser * parser ) { cp_token * kwd = cp_lexer_peek_token ( parser -> lexer ) ; switch ( kwd -> keyword ) { case RID_AT_ALIAS : cp_parser_objc_alias_declaration ( parser ) ; break ; case RID_AT_CLASS : cp_parser_objc_class_declaration ( parser ) ; break ; case RID_AT_PROTOCOL : cp_parser_objc_protocol_declaration ( parser , NULL_TREE ) ; break ; case RID_ATTRIBUTE : { tree attributes = NULL_TREE ; cp_parser_objc_maybe_attributes ( parser , & attributes ) ; if ( cp_lexer_peek_token ( parser -> lexer ) -> keyword == RID_AT_INTERFACE ) cp_parser_objc_class_interface ( parser , attributes ) ; else if ( cp_lexer_peek_token ( parser -> lexer ) -> keyword == RID_AT_PROTOCOL ) cp_parser_objc_protocol_declaration ( parser , attributes ) ; break ; } case RID_AT_INTERFACE : cp_parser_objc_class_interface ( parser , NULL_TREE ) ; break ; case RID_AT_IMPLEMENTATION : cp_parser_objc_class_implementation ( parser ) ; break ; case RID_AT_END : cp_parser_objc_end_implementation ( parser ) ; break ; default : error ( " " , kwd -> u . value ) ; cp_parser_skip_to_end_of_block_or_statement ( parser ) ; } }
Parse an Objective-C declaration.
Parse an Objective - C declaration .
/* Try to figure out what kind of declaration is present.  */ /* APPLE LOCAL radar 4947311 */ /* APPLE LOCAL begin radar 4548636 - radar 4947311 */ /* APPLE LOCAL end radar 4548636 - radar 4947311 */ /* APPLE LOCAL radar 4947311 */