aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-09-21 15:50:43 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-09-21 15:50:43 -0400
commitb58daa1469b36fdc7a8c3441ce33e0a6e6e61e0b (patch)
tree8fe86cfa9a21f09e43516edbe88faedb963f94b3 /src
parent8bdc6ed0938c48d36dd1d5ec3ba86f82e472e375 (diff)
Deprecate more set stuff
Diffstat (limited to 'src')
-rw-r--r--src/compile/README.md1
-rw-r--r--src/formatter/formatter.c2
-rw-r--r--src/stdlib/tables.c10
3 files changed, 5 insertions, 8 deletions
diff --git a/src/compile/README.md b/src/compile/README.md
index 2d26249d..df76d648 100644
--- a/src/compile/README.md
+++ b/src/compile/README.md
@@ -26,7 +26,6 @@ This directory contains the source files for actual cross-compilation
- Pointers (`@` and `&`): [pointers.c](pointers.c)
- Type promotions of values: [promotions.c](promotions.c)
- Reductions (`(+: nums)`): [reductions.c](reductions.c)
-- Sets (`|1, 2, 3|`): [sets.c](sets.c)
- General logic for compiling statements: [statements.c](statements.c)
- Structs (`struct`): [structs.c](structs.c)
- Tables (`{1=10, 2=20}`): [tables.c](tables.c)
diff --git a/src/formatter/formatter.c b/src/formatter/formatter.c
index 52a6303c..d37e2545 100644
--- a/src/formatter/formatter.c
+++ b/src/formatter/formatter.c
@@ -589,7 +589,7 @@ Text_t format_code(ast_t *ast, Table_t comments, Text_t indent) {
/*multiline*/ case List: {
if (inlined_fits) return inlined;
ast_list_t *items = Match(ast, List)->items;
- Text_t code = ast->tag == List ? Text("[") : Text("|");
+ Text_t code = Text("[");
const char *comment_pos = ast->start;
for (ast_list_t *item = items; item; item = item->next) {
for (OptionalText_t comment;
diff --git a/src/stdlib/tables.c b/src/stdlib/tables.c
index 7d5ff4ef..6e37751e 100644
--- a/src/stdlib/tables.c
+++ b/src/stdlib/tables.c
@@ -534,14 +534,12 @@ Text_t Table$as_text(const void *obj, bool colorize, const TypeInfo_t *type) {
__typeof(type->TableInfo) table = type->TableInfo;
if (!t) {
- if (table.value != &Void$info)
- return Text$concat(Text("{"), generic_as_text(NULL, false, table.key), Text("="),
- generic_as_text(NULL, false, table.value), Text("}"));
- else return Text$concat(Text("|"), generic_as_text(NULL, false, table.key), Text("|"));
+ return Text$concat(Text("{"), generic_as_text(NULL, false, table.key), Text("="),
+ generic_as_text(NULL, false, table.value), Text("}"));
}
int64_t val_off = (int64_t)value_offset(type);
- Text_t text = table.value == &Void$info ? Text("|") : Text("{");
+ Text_t text = Text("{");
for (int64_t i = 0, length = Table$length(*t); i < length; i++) {
if (i > 0) text = Text$concat(text, Text(", "));
void *entry = GET_ENTRY(*t, i);
@@ -554,7 +552,7 @@ Text_t Table$as_text(const void *obj, bool colorize, const TypeInfo_t *type) {
text = Text$concat(text, Text("; fallback="), Table$as_text(t->fallback, colorize, type));
}
- text = Text$concat(text, table.value == &Void$info ? Text("|") : Text("}"));
+ text = Text$concat(text, Text("}"));
return text;
}