Remove pointless test: If intern_parse_statement() returns a STATEMENT_ERROR, then...
authorChristoph Mallon <christoph.mallon@gmx.de>
Thu, 26 Apr 2012 12:28:11 +0000 (14:28 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Thu, 26 Apr 2012 13:19:18 +0000 (15:19 +0200)
parser.c

index 241e694..06efe47 100644 (file)
--- 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) {