diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-03 23:35:42 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-03 23:35:42 -0400 |
| commit | 805082d2990c780328bef7d0d8ebc5601ef02eb1 (patch) | |
| tree | 8488d9fbbb58f276b0bc277b79bd13bd2a2bdf57 /compile.c | |
| parent | f60edfbe7f7fe4a3f62228aeafc18a1819de5319 (diff) | |
Minor codegen cleanup Texts(...)
Diffstat (limited to 'compile.c')
| -rw-r--r-- | compile.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -593,7 +593,7 @@ CORD compile_statement(env_t *env, ast_t *ast) return CORD_all(lhs, " ^= ", rhs, ";"); case BINOP_CONCAT: { if (lhs_t->tag == TextType) { - return CORD_all(lhs, " = Text$concat(", lhs, ", ", rhs, ");"); + return CORD_all(lhs, " = Texts(", lhs, ", ", rhs, ");"); } else if (lhs_t->tag == ArrayType) { CORD padded_item_size = CORD_asprintf("%ld", padded_type_size(Match(lhs_t, ArrayType)->item_type)); if (promote(env, &rhs, rhs_t, Match(lhs_t, ArrayType)->item_type)) { @@ -822,7 +822,7 @@ CORD compile_statement(env_t *env, ast_t *ast) if (!to_print) return CORD_EMPTY; - CORD code = "say(Text$concat("; + CORD code = "say(Texts("; for (ast_list_t *chunk = to_print; chunk; chunk = chunk->next) { if (chunk->ast->tag == TextLiteral) { code = CORD_cat(code, compile(env, chunk->ast)); @@ -1845,7 +1845,7 @@ CORD compile(env_t *env, ast_t *ast) if (chunk->next) code = CORD_cat(code, ", "); } if (chunks->next) - return CORD_all("Text$concat(", code, ")"); + return CORD_all("Texts(", code, ")"); else return code; } |
