From: Christoph Mallon Date: Tue, 4 Nov 2008 14:37:49 +0000 (+0000) Subject: use expect() to find the ] of an array access expression. X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=af3bbb42788a3fd9cfbdc2fbef3d7aa6d43c4bfc;p=cparser use expect() to find the ] of an array access expression. [r23432] --- diff --git a/parser.c b/parser.c index bc02cfc..a808c1d 100644 --- a/parser.c +++ b/parser.c @@ -7422,11 +7422,8 @@ static expression_t *parse_array_expression(expression_t *left) expression->base.type = automatic_type_conversion(return_type); rem_anchor_token(']'); - if (token.type == ']') { - next_token(); - } else { - parse_error_expected("Problem while parsing array access", ']', NULL); - } + expect(']'); +end_error: return expression; }