diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-02-27 13:43:38 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-02-27 13:43:38 -0500 |
| commit | 805c26e65a4b96d61b98c984c526f2d3e2789749 (patch) | |
| tree | b313d195daafd0f7b4ee3aeae190d1515a4b10b8 /compile.c | |
| parent | 236cce883f581e510565d53f58c7566a96fc90f5 (diff) | |
Pass typeinfos
Diffstat (limited to 'compile.c')
| -rw-r--r-- | compile.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -70,10 +70,10 @@ CORD compile_statement(env_t *env, ast_t *ast) CORD expr_as_string(env_t *env, CORD expr, type_t *t, CORD color) { switch (t->tag) { - case MemoryType: return CORD_asprintf("Memory__as_str($stack(%r), %r, NULL)", expr, color); - case BoolType: return CORD_asprintf("Bool__as_str($stack(%r), %r, NULL)", expr, color); - case IntType: return CORD_asprintf("Int%ld__as_str($stack(%r), %r, NULL)", Match(t, IntType)->bits, expr, color); - case NumType: return CORD_asprintf("Num%ld__as_str($stack(%r), %r, NULL)", Match(t, NumType)->bits, expr, color); + case MemoryType: return CORD_asprintf("Memory__as_str($stack(%r), %r, &Memory)", expr, color); + case BoolType: return CORD_asprintf("Bool__as_str($stack(%r), %r, &Bool)", expr, color); + case IntType: return CORD_asprintf("Int%ld__as_str($stack(%r), %r, &Int%ld)", Match(t, IntType)->bits, expr, color, Match(t, IntType)->bits); + case NumType: return CORD_asprintf("Num%ld__as_str($stack(%r), %r, &Num%ld)", Match(t, NumType)->bits, expr, color, Match(t, NumType)->bits); case StringType: return CORD_asprintf("Str__as_str($stack(%r), %r, &Str)", expr, color); case ArrayType: return CORD_asprintf("Array__as_str($stack(%r), %r, %r)", expr, color, compile_type_info(env, t)); case TableType: return CORD_asprintf("Table_as_str($stack(%r), %r, %r)", expr, color, compile_type_info(env, t)); |
