aboutsummaryrefslogtreecommitdiff
path: root/src/parse/containers.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-09-06 15:11:26 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-09-06 15:11:26 -0400
commitfb216e955f04a803f11953be27e76bd4d2c9e76d (patch)
treede2c471c5416ec2ee490bdb33f5e3e202d94675a /src/parse/containers.c
parent73246764f88f6f652316ee0c138a990d836698a7 (diff)
Use colons instead of '=' for tables (e.g. {1: 2})
Diffstat (limited to 'src/parse/containers.c')
-rw-r--r--src/parse/containers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parse/containers.c b/src/parse/containers.c
index 73d30ecd..c6362623 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);