From c4b6159f76d58a3410c818655d3e60647f08c2ad Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 26 Nov 2024 13:07:48 -0500 Subject: Permit spaces before indexes --- parse.c | 1 + 1 file changed, 1 insertion(+) (limited to 'parse.c') diff --git a/parse.c b/parse.c index 275155bc..33a5b312 100644 --- a/parse.c +++ b/parse.c @@ -995,6 +995,7 @@ ast_t *parse_index_suffix(parse_ctx_t *ctx, ast_t *lhs) { if (!lhs) return NULL; const char *start = lhs->start; const char *pos = lhs->end; + spaces(&pos); if (!match(&pos, "[")) return NULL; whitespace(&pos); ast_t *index = optional(ctx, &pos, parse_extended_expr); -- cgit v1.2.3