diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-09-01 13:17:43 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-09-01 13:17:43 -0400 |
| commit | ee020c72d92c3807fa4afcd1e170d3df81688b97 (patch) | |
| tree | 60d0bd641db08bab082bbbb7f10f72d29995cdfe /src/compile/assignments.c | |
| parent | c0c6fe863f8e074cbe8297b5da2a476f455b6518 (diff) | |
Switch to using Texts(x) instead of Texts(String(x)) when possible
Diffstat (limited to 'src/compile/assignments.c')
| -rw-r--r-- | src/compile/assignments.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/compile/assignments.c b/src/compile/assignments.c index ab28b972..3cb60fd5 100644 --- a/src/compile/assignments.c +++ b/src/compile/assignments.c @@ -119,12 +119,12 @@ Text_t compile_assignment_statement(env_t *env, ast_t *ast) { "stack memory."); env_t *val_env = with_enum_scope(env, lhs_t); Text_t val = compile_to_type(val_env, value->ast, lhs_t); - code = Texts(code, compile_type(lhs_t), " $", String(i), " = ", val, ";\n"); + code = Texts(code, compile_type(lhs_t), " $", i, " = ", val, ";\n"); i += 1; } i = 1; for (ast_list_t *target = assign->targets; target; target = target->next) { - code = Texts(code, compile_assignment(env, target->ast, Texts("$", String(i))), ";\n"); + code = Texts(code, compile_assignment(env, target->ast, Texts("$", i)), ";\n"); i += 1; } return Texts(code, "\n}"); @@ -171,8 +171,7 @@ Text_t compile_lvalue(env_t *env, ast_t *ast) { ")"); } else { return Texts("List_lvalue(", compile_type(item_type), ", ", target_code, ", ", index_code, ", ", - String((int)(ast->start - ast->file->text)), ", ", - String((int)(ast->end - ast->file->text)), ")"); + (int64_t)(ast->start - ast->file->text), ", ", (int64_t)(ast->end - ast->file->text), ")"); } } else if (container_t->tag == TableType) { DeclareMatch(table_type, container_t, TableType); |
