diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-09-21 15:14:37 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-09-21 15:14:37 -0400 |
| commit | f5612e38183dc20d18f207f8ab055574a4d93ad0 (patch) | |
| tree | c2caf5a0311b6d9fd0fbd4c08493dac5981088be /src/compile/text.c | |
| parent | 7f6683269ce689a83b9c6e1fae15e0cc60351095 (diff) | |
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`
Diffstat (limited to 'src/compile/text.c')
| -rw-r--r-- | src/compile/text.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |
