m3-sys/m3cc/gcc-apple/gcc/c-parser.c
/* Like c_parser_require, except that tokens will be skipped until the
   desired token is found.  An error message is still produced if the
   next token is not as expected.  If MSGID is NULL then a message has
   already been produced and no message will be produced this
   time.  */
Like c_parser_require, except that tokens will be skipped until the
desired token is found.  An error message is still produced if the
next token is not as expected.  If MSGID is NULL then a message has
already been produced and no message will be produced this
time.
Like c_parser_require except that tokens will be skipped until the desired token is found . An error message is still produced if the next token is not as expected . If MSGID is NULL then a message has already been produced and no message will be produced this time .
static void
c_parser_skip_until_found (c_parser *parser,
			   enum cpp_ttype type,
			   const char *msgid)
{
  unsigned nesting_depth = 0;
  if (c_parser_require (parser, type, msgid))
    return;
  while (true)
    {
      c_token *token = c_parser_peek_token (parser);
      if (token->type == type && !nesting_depth)
	{
	  c_parser_consume_token (parser);
	  break;
	}
      if (token->type == CPP_EOF)
	return;
      if (token->type == CPP_PRAGMA_EOL && parser->in_pragma)
	return;
      if (token->type == CPP_OPEN_BRACE
	  || token->type == CPP_OPEN_PAREN
	  || token->type == CPP_OPEN_SQUARE)
	++nesting_depth;
      else if (token->type == CPP_CLOSE_BRACE
	       || token->type == CPP_CLOSE_PAREN
	       || token->type == CPP_CLOSE_SQUARE)
	{
	  if (nesting_depth-- == 0)
	    break;
	}
      c_parser_consume_token (parser);
    }
  parser->error = false;
}
static void c_parser_skip_until_found ( c_parser * parser , enum cpp_ttype type , const char * msgid ) { unsigned nesting_depth = 0 ; if ( c_parser_require ( parser , type , msgid ) ) return ; while ( true ) { c_token * token = c_parser_peek_token ( parser ) ; if ( token -> type == type && ! nesting_depth ) { c_parser_consume_token ( parser ) ; break ; } if ( token -> type == CPP_EOF ) return ; if ( token -> type == CPP_PRAGMA_EOL && parser -> in_pragma ) return ; if ( token -> type == CPP_OPEN_BRACE || token -> type == CPP_OPEN_PAREN || token -> type == CPP_OPEN_SQUARE ) ++ nesting_depth ; else if ( token -> type == CPP_CLOSE_BRACE || token -> type == CPP_CLOSE_PAREN || token -> type == CPP_CLOSE_SQUARE ) { if ( nesting_depth -- == 0 ) break ; } c_parser_consume_token ( parser ) ; } parser -> error = false ; }
Like c_parser_require, except that tokens will be skipped until the
desired token is found.
Like c_parser_require except that tokens will be skipped until the desired token is found .
/* Skip tokens until the desired token is found.  */ /* Peek at the next token.  */ /* If we've reached the token we want, consume it and stop.  */ /* If we've run out of tokens, stop.  */ /* Consume this token.  */