aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-09-21 20:51:24 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-09-21 20:51:24 -0400
commitfa7a0ddc0963deb387f0cae7bb22ca968ee9146f (patch)
tree30caf6aec6ecc0581337b6507eb87ae508386f6e /src
parentb84e7c69ae52155c4902cf24b4f9bb86d65d5f9e (diff)
Fix formatter for tables
Diffstat (limited to 'src')
-rw-r--r--src/formatter/formatter.c2
-rw-r--r--src/formatter/types.c4
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, "}");
}