Do not return an error statement from parse_ms_try_statment(), just keep on parsing.
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 25 Apr 2012 19:33:29 +0000 (21:33 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Thu, 26 Apr 2012 07:57:55 +0000 (09:57 +0200)
parser.c

index f89e693..1216d10 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -9864,13 +9864,10 @@ static statement_t *parse_ms_try_statment(void)
                        type = type_error_type;
                }
                statement->ms_try.except_expression = create_implicit_cast(expr, type);
-               statement->ms_try.final_statement   = parse_compound_statement(false);
-       } else if (next_if(T__finally)) {
-               statement->ms_try.final_statement = parse_compound_statement(false);
-       } else {
+       } else if (!next_if(T__finally)) {
                parse_error_expected("while parsing __try statement", T___except, T___finally, NULL);
-               return create_error_statement();
        }
+       statement->ms_try.final_statement = parse_compound_statement(false);
        return statement;
 }