diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-09-21 18:01:19 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-09-21 18:01:19 -0400 |
| commit | 68bedd3c23757a8576e77f38e38ddcf9ecd26d19 (patch) | |
| tree | 86ce1610143efc43453f50d3413925797601c48a /src/parse/containers.c | |
| parent | 0815de981c683cac7dbac082ee14c11894089f31 (diff) | |
Use colons instead of '=' for tables (e.g. {1: 2})
Diffstat (limited to 'src/parse/containers.c')
| -rw-r--r-- | src/parse/containers.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |
