llvm-gcc-4.2-2.9/gcc/cp/parser.c
/* Skip tokens until we have consumed an entire block, or until we
   have consumed a non-nested `;'.  */
Skip tokens until we have consumed an entire block, or until we
have consumed a non-nested `;'.
Skip tokens until we have consumed an entire block or until we have consumed a non - nested ` ; ' .
static void
cp_parser_skip_to_end_of_block_or_statement (cp_parser* parser)
{
  int nesting_depth = 0;
  while (nesting_depth >= 0)
    {
      cp_token *token = cp_lexer_peek_token (parser->lexer);
      switch (token->type)
	{
	case CPP_EOF:
	case CPP_PRAGMA_EOL:
	  return;
	case CPP_SEMICOLON:
	  if (!nesting_depth)
	    nesting_depth = -1;
	  break;
	case CPP_CLOSE_BRACE:
	  nesting_depth--;
	  if (!nesting_depth)
	    nesting_depth = -1;
	  break;
	case CPP_OPEN_BRACE:
	  nesting_depth++;
	  break;
	default:
	  break;
	}
      cp_lexer_consume_token (parser->lexer);
    }
}
static void cp_parser_skip_to_end_of_block_or_statement ( cp_parser * parser ) { int nesting_depth = 0 ; while ( nesting_depth >= 0 ) { cp_token * token = cp_lexer_peek_token ( parser -> lexer ) ; switch ( token -> type ) { case CPP_EOF : case CPP_PRAGMA_EOL : return ; case CPP_SEMICOLON : if ( ! nesting_depth ) nesting_depth = -1 ; break ; case CPP_CLOSE_BRACE : nesting_depth -- ; if ( ! nesting_depth ) nesting_depth = -1 ; break ; case CPP_OPEN_BRACE : nesting_depth ++ ; break ; default : break ; } cp_lexer_consume_token ( parser -> lexer ) ; } }
Skip tokens until we have consumed an entire block, or until we
have consumed a non-nested `;'.
Skip tokens until we have consumed an entire block or until we have consumed a non - nested ` ; ' .
/* If we've run out of tokens, stop.  */ /* Stop if this is an unnested ';'. */ /* Stop if this is an unnested '}', or closes the outermost
	     nesting level.  */ /* Nest. */ /* Consume the token.  */