Marginally simplify parse_goto().
authorChristoph Mallon <christoph.mallon@gmx.de>
Fri, 20 Feb 2009 16:45:42 +0000 (16:45 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Fri, 20 Feb 2009 16:45:42 +0000 (16:45 +0000)
[r25535]

parser.c

index 6f63a8a..657c5a0 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -10495,19 +10495,17 @@ static statement_t *parse_goto(void)
                }
 
                statement->gotos.expression = expression;
-       } else {
-               if (token.type != T_IDENTIFIER) {
-                       if (GNU_MODE)
-                               parse_error_expected("while parsing goto", T_IDENTIFIER, '*', NULL);
-                       else
-                               parse_error_expected("while parsing goto", T_IDENTIFIER, NULL);
-                       eat_until_anchor();
-                       goto end_error;
-               }
+       } else if (token.type == T_IDENTIFIER) {
                symbol_t *symbol = token.v.symbol;
                next_token();
-
                statement->gotos.label = get_label(symbol);
+       } else {
+               if (GNU_MODE)
+                       parse_error_expected("while parsing goto", T_IDENTIFIER, '*', NULL);
+               else
+                       parse_error_expected("while parsing goto", T_IDENTIFIER, NULL);
+               eat_until_anchor();
+               goto end_error;
        }
 
        /* remember the goto's in a list for later checking */