From 53ca7e1b49ce2fba0b5bd13722936ec2c93e16ad Mon Sep 17 00:00:00 2001 From: Timerix Date: Tue, 4 Feb 2025 13:31:19 +0500 Subject: [PATCH] writeBinaryFile --- src/compiler/Compiler.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/compiler/Compiler.c b/src/compiler/Compiler.c index a4244cc..d94f0ac 100644 --- a/src/compiler/Compiler.c +++ b/src/compiler/Compiler.c @@ -60,10 +60,15 @@ str Compiler_constructTokenStr(Compiler* cmp, Token t){ return s; } -static bool compileFile(Compiler* cmp, FILE* f){ +static bool writeBinaryFile(Compiler* cmp, FILE* f){ returnErrorIf_auto(cmp->state != CompilerState_Parsing); cmp->state = CompilerState_Compiling; + for(u32 i = 0; i < cmp->ast.sections.len; i++){ + Section* sec = &cmp->ast.sections.data[i]; + + } + return true; } @@ -146,7 +151,7 @@ bool Compiler_compile(Compiler* cmp, cstr source_file_name, cstr out_file_name, if(debug_log) printf("==================================[compiling]==================================\n"); - success = compileFile(cmp, f); + success = writeBinaryFile(cmp, f); fclose(f); if(success){ cmp->state = CompilerState_Success;