From 68bedd3c23757a8576e77f38e38ddcf9ecd26d19 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 21 Sep 2025 18:01:19 -0400 Subject: Use colons instead of '=' for tables (e.g. {1: 2}) --- src/parse/containers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/parse/containers.c') diff --git a/src/parse/containers.c b/src/parse/containers.c index b7378b18..55ff336e 100644 --- a/src/parse/containers.c +++ b/src/parse/containers.c @@ -50,7 +50,7 @@ ast_t *parse_table(parse_ctx_t *ctx, const char *pos) { ast_t *key = optional(ctx, &pos, parse_extended_expr); if (!key) break; whitespace(ctx, &pos); - if (!match(&pos, "=")) return NULL; + if (!match(&pos, ":")) return NULL; ast_t *value = expect(ctx, pos - 1, &pos, parse_expr, "I couldn't parse the value for this table entry"); ast_t *entry = NewAST(ctx->file, entry_start, pos, TableEntry, .key = key, .value = value); ast_t *suffixed = parse_comprehension_suffix(ctx, entry); -- cgit v1.2.3