diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-05-27 18:02:40 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-05-27 18:02:40 -0400 |
| commit | cb634f61f78bb629164f98ea04ab04a8e5c5b67d (patch) | |
| tree | 0dde5e2c4bb60fad30f42f71097f5cce786f4598 | |
| parent | c9889582a7f56b3bfdca455a8d84167f688cd3c8 (diff) | |
Remove unused code
| -rw-r--r-- | compile.c | 4 | ||||
| -rw-r--r-- | compile.h | 2 | ||||
| -rw-r--r-- | tomo.c | 2 |
3 files changed, 2 insertions, 6 deletions
@@ -833,13 +833,10 @@ CORD compile_statement(env_t *env, ast_t *ast) case Use: { auto use = Match(ast, Use); const char *path = use->raw_path; - const char *name = file_base_name(path); if (strncmp(path, "./", 2) == 0 || strncmp(path, "../", 3) == 0) { env->code->imports = CORD_all(env->code->imports, "#include \"", path, ".h\"\n"); - env->code->object_files = CORD_all(env->code->object_files, "'", path, ".o' "); } else { env->code->imports = CORD_all(env->code->imports, "#include <", path, ".h>\n"); - env->code->object_files = CORD_all(env->code->object_files, "-l", name, " "); } return CORD_EMPTY; } @@ -2246,7 +2243,6 @@ module_code_t compile_file(ast_t *ast) return (module_code_t){ .module_name=name, .env=env, - .object_files=env->code->object_files, .header=CORD_all( // "#line 1 ", Text$quoted(ast->file->filename, false), "\n", "#include <tomo/tomo.h>\n", @@ -12,7 +12,7 @@ typedef struct { const char *module_name; env_t *env; - CORD header, c_file, object_files; + CORD header, c_file; } module_code_t; CORD expr_as_text(env_t *env, CORD expr, type_t *t, CORD color); @@ -242,7 +242,7 @@ int transpile(const char *filename, bool force_retranspile, module_code_t *modul ast_t *ast = parse_file(f, NULL); if (!ast) - errx(1, "Could not compile!"); + errx(1, "Could not compile %s", f); if (verbose) { FILE *out = popen(heap_strf("bat -P --file-name='%s'", filename), "w"); |
