Cleanup Catch clause

This commit is contained in:
Roberto Raggi
2009-11-10 15:15:51 +01:00
parent 380bce4527
commit 30c67f43df
7 changed files with 12 additions and 15 deletions

View File

@@ -2949,7 +2949,7 @@ bool Parser::parseTryBlockStatement(StatementAST *&node)
TryBlockStatementAST *ast = new (_pool) TryBlockStatementAST;
ast->try_token = consumeToken();
parseCompoundStatement(ast->statement);
CatchClauseAST **catch_clause_ptr = &ast->catch_clause_seq;
CatchClauseListAST **catch_clause_ptr = &ast->catch_clause_list;
while (parseCatchClause(*catch_clause_ptr))
catch_clause_ptr = &(*catch_clause_ptr)->next;
node = ast;
@@ -2958,7 +2958,7 @@ bool Parser::parseTryBlockStatement(StatementAST *&node)
return false;
}
bool Parser::parseCatchClause(CatchClauseAST *&node)
bool Parser::parseCatchClause(CatchClauseListAST *&node)
{
DEBUG_THIS_RULE();
if (LA() == T_CATCH) {
@@ -2968,7 +2968,7 @@ bool Parser::parseCatchClause(CatchClauseAST *&node)
parseExceptionDeclaration(ast->exception_declaration);
match(T_RPAREN, &ast->rparen_token);
parseCompoundStatement(ast->statement);
node = ast;
node = new (_pool) CatchClauseListAST(ast);
return true;
}
return false;