diff options
| author | Mel <mel@rnrd.eu> | 2026-01-22 03:55:02 +0100 |
|---|---|---|
| committer | Mel <mel@rnrd.eu> | 2026-01-22 03:55:02 +0100 |
| commit | 7f5d765c929a4dc2deddb7b68a41a3a841940837 (patch) | |
| tree | c442166ede9f6b4c3a82621a39d754dde8c407ac /boot/transpile.c | |
| parent | 30b04e4b2a90981570ae04095aeccd746ccdea6a (diff) | |
| download | catskill-7f5d765c929a4dc2deddb7b68a41a3a841940837.tar.zst catskill-7f5d765c929a4dc2deddb7b68a41a3a841940837.zip | |
LLVM clang compiler backend
Signed-off-by: Mel <mel@rnrd.eu>
Diffstat (limited to 'boot/transpile.c')
| -rw-r--r-- | boot/transpile.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/boot/transpile.c b/boot/transpile.c index 01531d9..b1171d7 100644 --- a/boot/transpile.c +++ b/boot/transpile.c @@ -3,7 +3,7 @@ * takes a direct catskill syntax tree and produces a c source file, * without an intermediate representation. * - * Copyright (c) 2025, Mel G. <mel@rnrd.eu> + * Copyright (c) 2025-2026, Mel G. <mel@rnrd.eu> * * SPDX-License-Identifier: MPL-2.0 */ @@ -397,10 +397,10 @@ transpiler_visit_tree(struct Visit* visit, struct Tree* tree) // other headers can be included by the user // with the pragma `| c-header "header.h"`. // TODO: for now we just reference the path to it in this repo - // exactly, when we actually just want to fully include the string - // of the entire file into the transpiled output, for development it's - // okay for now. - fprintf(transpiler->output, "#include \"boot/runtime/core.c\"\n"); + // exactly and tell the backend in `./build.c` to look for includes there, + // but in the real implementation we should embed all runtime files into + // this executable and then write them out into the temporary build directory. + fprintf(transpiler->output, "#include \"core.c\"\n"); FOR_EACH (struct Statement*, statement, tree->top_level_statements) { VISIT(visit_statement, statement); @@ -413,7 +413,7 @@ transpiler_visit_tree(struct Visit* visit, struct Tree* tree) if (transpiler->context.main_function_takes_args) { fprintf(transpiler->output, "\n#define CATSKILL_MAIN_TAKES_ARGS\n"); } - fprintf(transpiler->output, "#include \"boot/runtime/runtime.c\"\n"); + fprintf(transpiler->output, "#include \"runtime.c\"\n"); } } |
