diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-02-18 01:03:23 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-02-18 01:03:23 -0500 |
| commit | 733ebfd234906aac08a66e6c2ebe7ed2a0c4d375 (patch) | |
| tree | 0fcf39f0891ef8120fa929af6a059ba3578f4047 | |
| parent | 5ebbfc205ae1f78f9f13d1453523212c9c9e646b (diff) | |
Fix up some Str stuff
| -rw-r--r-- | builtins/string.h | 1 | ||||
| -rw-r--r-- | compile.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/builtins/string.h b/builtins/string.h index 48c39ae5..f9dc83cc 100644 --- a/builtins/string.h +++ b/builtins/string.h @@ -47,6 +47,7 @@ typedef struct { } Str_namespace_t; extern Str_namespace_t Str; +CORD Str__as_str(const void *str, bool colorize, const TypeInfo *info); CORD Str__quoted(CORD str, bool colorize); int Str__compare(CORD *x, CORD *y); bool Str__equal(CORD *x, CORD *y); @@ -44,7 +44,7 @@ CORD expr_as_string(env_t *env, CORD expr, type_t *t, CORD color) case BoolType: return CORD_asprintf("Bool__as_str(%r, %r, NULL)", expr, color); case IntType: return CORD_asprintf("Int%ld__as_str(%r, %r, NULL)", Match(t, IntType)->bits, expr, color); case NumType: return CORD_asprintf("Num%ld__as_str(%r, %r, NULL)", Match(t, NumType)->bits, expr, color); - case StringType: return CORD_asprintf("Str__as_str(%r, %r, &Str_type.type)", expr, color); + case StringType: return CORD_asprintf("Str__as_str(%r, %r, &Str.type)", expr, color); case ArrayType: return CORD_asprintf("Array__as_str(%r, %r, %r)", expr, color, compile_type_info(env, t)); case TableType: return CORD_asprintf("Table_as_str(%r, %r, %r)", expr, color, compile_type_info(env, t)); case FunctionType: return CORD_asprintf("Func__as_str(%r, %r, %r)", expr, color, compile_type_info(env, t)); |
