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/statements.c | |
| parent | c0c6fe863f8e074cbe8297b5da2a476f455b6518 (diff) | |
Switch to using Texts(x) instead of Texts(String(x)) when possible
Diffstat (limited to 'src/compile/statements.c')
| -rw-r--r-- | src/compile/statements.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compile/statements.c b/src/compile/statements.c index 7c58559d..e296795b 100644 --- a/src/compile/statements.c +++ b/src/compile/statements.c @@ -22,7 +22,7 @@ public Text_t with_source_info(env_t *env, ast_t *ast, Text_t code) { if (code.length == 0 || !ast || !ast->file || !env->do_source_mapping) return code; int64_t line = get_line_number(ast->file, ast->start); - return Texts("\n#line ", String(line), "\n", code); + return Texts("\n#line ", line, "\n", code); } static Text_t _compile_statement(env_t *env, ast_t *ast) { @@ -121,7 +121,7 @@ static Text_t _compile_statement(env_t *env, ast_t *ast) { if (Text$starts_with(entry->b->code, Text("userdata->"), NULL)) { Table$str_set(defer_env->locals, entry->name, entry->b); } else { - Text_t defer_name = Texts("defer$", String(++defer_id), "$", entry->name); + Text_t defer_name = Texts("defer$", ++defer_id, "$", entry->name); defer_id += 1; code = Texts(code, compile_declaration(entry->b->type, defer_name), " = ", entry->b->code, ";\n"); set_binding(defer_env, entry->name, entry->b->type, defer_name); |
