From af3bbb42788a3fd9cfbdc2fbef3d7aa6d43c4bfc Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Tue, 4 Nov 2008 14:37:49 +0000 Subject: [PATCH] use expect() to find the ] of an array access expression. [r23432] --- parser.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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; } -- 2.20.1