aboutsummaryrefslogtreecommitdiff
path: root/src/stdlib
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-06 16:34:23 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-06 16:34:23 -0400
commit52e50e58c6674560056a4dcb787099d739284b02 (patch)
treee814b9d779e523c042f938161aadd7dd589327cf /src/stdlib
parent6fda59fd5e57e9267d2ec0480d53b5f9b0546855 (diff)
Change Set syntax from {x} to |x|
Diffstat (limited to 'src/stdlib')
-rw-r--r--src/stdlib/tables.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/stdlib/tables.c b/src/stdlib/tables.c
index 71b9c7f4..d59bc113 100644
--- a/src/stdlib/tables.c
+++ b/src/stdlib/tables.c
@@ -588,13 +588,13 @@ public Text_t Table$as_text(const void *obj, bool colorize, const TypeInfo_t *ty
Text("}"));
else
return Text$concat(
- Text("{"),
+ Text("|"),
generic_as_text(NULL, false, table.key),
- Text("}"));
+ Text("|"));
}
int64_t val_off = (int64_t)value_offset(type);
- Text_t text = Text("{");
+ Text_t text = table.value == &Void$info ? Text("|") : Text("{");
for (int64_t i = 0, length = Table$length(*t); i < length; i++) {
if (i > 0)
text = Text$concat(text, Text(", "));
@@ -604,14 +604,11 @@ public Text_t Table$as_text(const void *obj, bool colorize, const TypeInfo_t *ty
text = Text$concat(text, Text("="), generic_as_text(entry + val_off, colorize, table.value));
}
- if (table.value == &Void$info)
- text = Text$concat(text, Text("/"));
-
if (t->fallback) {
text = Text$concat(text, Text("; fallback="), Table$as_text(t->fallback, colorize, type));
}
- text = Text$concat(text, Text("}"));
+ text = Text$concat(text, table.value == &Void$info ? Text("|") : Text("}"));
return text;
}