From 51854e5db46033712b5dbbf78d769ea500eca14f Mon Sep 17 00:00:00 2001 From: Kai Gunger Date: Fri, 28 Nov 2025 23:54:11 -0500 Subject: Update module building code --- tnslc/compile/codegen.tnsl | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'tnslc/compile/codegen.tnsl') diff --git a/tnslc/compile/codegen.tnsl b/tnslc/compile/codegen.tnsl index caaafb7..ccb6b06 100644 --- a/tnslc/compile/codegen.tnsl +++ b/tnslc/compile/codegen.tnsl @@ -1,8 +1,30 @@ /; generate (~utils.File fin, fout) - parse.Node ast = parse.generate_ast(fin) - ast.update_children() - parse.print_ast(~ast) - ast.end() + # Parse files into AST + parse.Node ast = parse.generate_ast(fin) + ast.update_children() + parse.print_ast(~ast) + + # Create output buffer + CompBuf buffer + buffer.init() + + # Transform into a module tree + # Module mod + # mod.init(~ast) + # mod.update_children() + + # Compile code + # mod.compile(~buffer) + + # Write assembly to output file + # fout.create() + # buffer.write_to(fout) + # fout.close() + + # Free all structs + # mod.end() + buffer.end() + ast.end() ;/ -- cgit v1.2.3