diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-09-01 13:20:17 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-09-01 13:20:17 -0400 |
| commit | c778c8822f1c8acf981e26f7b860a384c94cff6f (patch) | |
| tree | 550e52a4037b202de00d9f43321c996fd964c2a9 /src/compile/assignments.c | |
| parent | 639d5ddfca562e5b3645955551be244b5e8ca9c6 (diff) | |
| parent | ee020c72d92c3807fa4afcd1e170d3df81688b97 (diff) | |
Merge branch 'main' into optional-list-indexing
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 5fedad9a..6848e298 100644 --- a/src/compile/assignments.c +++ b/src/compile/assignments.c @@ -121,12 +121,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}"); @@ -169,8 +169,7 @@ Text_t compile_lvalue(env_t *env, ast_t *ast) { : (index_t->tag == BigIntType ? Texts("Int64$from_int(", compile(env, index->index), ", no)") : Texts("(Int64_t)(", compile(env, index->index), ")")); 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); if (table_type->default_value) { |
