Improve error recovery, when parsing case statements.
authorChristoph Mallon <christoph.mallon@gmx.de>
Mon, 24 Nov 2008 13:01:35 +0000 (13:01 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Mon, 24 Nov 2008 13:01:35 +0000 (13:01 +0000)
[r23933]

parser.c

index 435aab4..0d6a09a 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -9662,6 +9662,7 @@ static statement_t *parse_case_statement(void)
        PUSH_PARENT(statement);
 
        expect(':');
+end_error:
 
        if (current_switch != NULL) {
                if (! statement->case_label.is_bad) {
@@ -9698,9 +9699,6 @@ static statement_t *parse_case_statement(void)
 
        POP_PARENT;
        return statement;
-end_error:
-       POP_PARENT;
-       return create_invalid_statement();
 }
 
 /**