From: Christoph Mallon Date: Thu, 26 Apr 2012 12:28:11 +0000 (+0200) Subject: Remove pointless test: If intern_parse_statement() returns a STATEMENT_ERROR, then... X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=26f770852c6f08e8dfbd17d17a4a2787564b9ff4;p=cparser Remove pointless test: If intern_parse_statement() returns a STATEMENT_ERROR, then the current token is an anchor. --- diff --git a/parser.c b/parser.c index 241e694..06efe47 100644 --- a/parser.c +++ b/parser.c @@ -546,17 +546,6 @@ static void rem_anchor_token(int token_kind) --token_anchor_set[token_kind]; } -/** - * Return true if the token type of the current token is - * in the anchor set. - */ -static bool at_anchor(void) -{ - if (token.kind < 0) - return false; - return token_anchor_set[token.kind]; -} - /** * Eat tokens until a matching token type is found. */ @@ -10177,10 +10166,7 @@ static statement_t *parse_compound_statement(bool inside_expression_statement) } statement_t *sub_statement = intern_parse_statement(); if (sub_statement->kind == STATEMENT_ERROR) { - /* an error occurred. if we are at an anchor, return */ - if (at_anchor()) - goto end_error; - continue; + goto end_error; } if (sub_statement->kind != STATEMENT_DECLARATION) {