llvm-gcc-4.2-2.9/gcc/cp/parser.c
/* Skip tokens until a non-nested closing curly brace is the next
   token.  */
Skip tokens until a non-nested closing curly brace is the next
token.
Skip tokens until a non - nested closing curly brace is the next token .
static void
cp_parser_skip_to_closing_brace (cp_parser *parser)
{
  unsigned nesting_depth = 0;
  while (true)
    {
      cp_token *token = cp_lexer_peek_token (parser->lexer);
      switch (token->type)
	{
	case CPP_EOF:
	case CPP_PRAGMA_EOL:
	  return;
	case CPP_CLOSE_BRACE:
	  if (nesting_depth-- == 0)
	    return;
	  break;
	case CPP_OPEN_BRACE:
	  ++nesting_depth;
	  break;
	default:
	  break;
	}
      cp_lexer_consume_token (parser->lexer);
    }
}
static void cp_parser_skip_to_closing_brace ( cp_parser * parser ) { unsigned nesting_depth = 0 ; while ( true ) { cp_token * token = cp_lexer_peek_token ( parser -> lexer ) ; switch ( token -> type ) { case CPP_EOF : case CPP_PRAGMA_EOL : return ; case CPP_CLOSE_BRACE : if ( nesting_depth -- == 0 ) return ; break ; case CPP_OPEN_BRACE : ++ nesting_depth ; break ; default : break ; } cp_lexer_consume_token ( parser -> lexer ) ; } }
Skip tokens until a non-nested closing curly brace is the next
token.
Skip tokens until a non - nested closing curly brace is the next token .
/* If we've run out of tokens, stop.  */ /* If the next token is a non-nested `}', then we have reached
	     the end of the current block.  */ /* If it the next token is a `{', then we are entering a new
	     block.  Consume the entire block.  */ /* Consume the token.  */