From fa7a0ddc0963deb387f0cae7bb22ca968ee9146f Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 21 Sep 2025 20:51:24 -0400 Subject: Fix formatter for tables --- src/formatter/formatter.c | 2 +- src/formatter/types.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/formatter/formatter.c b/src/formatter/formatter.c index 0123282c..12f08810 100644 --- a/src/formatter/formatter.c +++ b/src/formatter/formatter.c @@ -635,7 +635,7 @@ Text_t format_code(ast_t *ast, Table_t comments, Text_t indent) { /*multiline*/ case TableEntry: { if (inlined_fits) return inlined; DeclareMatch(entry, ast, TableEntry); - return Texts(fmt(entry->key, comments, indent), "=", fmt(entry->value, comments, indent)); + return Texts(fmt(entry->key, comments, indent), ": ", fmt(entry->value, comments, indent)); } /*multiline*/ case Declare: { if (inlined_fits) return inlined; diff --git a/src/formatter/types.c b/src/formatter/types.c index 0cff38f0..3c77fa7d 100644 --- a/src/formatter/types.c +++ b/src/formatter/types.c @@ -19,11 +19,11 @@ Text_t format_type(type_ast_t *type) { } case TableTypeAST: { DeclareMatch(table, type, TableTypeAST); - Text_t code = Texts("{", format_type(table->key), "=", format_type(table->value)); + Text_t code = Texts("{", format_type(table->key), ":", format_type(table->value)); if (table->default_value) { OptionalText_t val = format_inline_code(table->default_value, (Table_t){}); assert(val.length >= 0); - code = Texts(code, "; default=", val); + code = Texts(code, "=", val); } return Texts(code, "}"); } -- cgit v1.2.3