From f5612e38183dc20d18f207f8ab055574a4d93ad0 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 21 Sep 2025 15:14:37 -0400 Subject: Bugfixes for anonymous enums, code cleanup to remove type_to_string(), and changed it so anonymous enums show up in doctests with their full type instead of `enum$20` --- src/compile/text.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/compile/text.c') diff --git a/src/compile/text.c b/src/compile/text.c index 0e0b41f8..afb412e9 100644 --- a/src/compile/text.c +++ b/src/compile/text.c @@ -38,7 +38,7 @@ Text_t expr_as_text(Text_t expr, type_t *t, Text_t color) { case OptionalType: return Texts("Optional$as_text(stack(", expr, "), ", color, ", ", compile_type_info(t), ")"); case StructType: case EnumType: return Texts("generic_as_text(stack(", expr, "), ", color, ", ", compile_type_info(t), ")"); - default: compiler_err(NULL, NULL, NULL, "Stringifying is not supported for ", type_to_str(t)); + default: compiler_err(NULL, NULL, NULL, "Stringifying is not supported for ", type_to_text(t)); } return EMPTY_TEXT; } @@ -136,8 +136,8 @@ Text_t compile_text_ast(env_t *env, ast_t *ast) { if (chunk_t->tag == TextType) chunk_code = compile(env, chunk->ast); else chunk_code = compile_text(env, chunk->ast, colorize); } else { - code_err(chunk->ast, "I don't know how to convert ", type_to_str(chunk_t), " to ", - type_to_str(text_t)); + code_err(chunk->ast, "I don't know how to convert ", type_to_text(chunk_t), " to ", + type_to_text(text_t)); } } code = Texts(code, chunk_code); -- cgit v1.2.3