feat: basic code generation

This commit is contained in:
Brett Broadhurst 2026-03-02 13:20:02 -07:00
parent 3ab279de0f
commit 55346fcd85
Failed to generate hash of commit
4 changed files with 579 additions and 16 deletions

View file

@ -85,6 +85,16 @@ fn mainArgs(
.use_color = use_color,
});
defer story.deinit();
try story.dump(&stderr_writer.interface);
if (compile_only) return;
while (story.can_advance) {
const content = try story.advance();
defer gpa.free(content);
std.debug.print("{s}\n", .{content});
}
}
fn readSourceFile(gpa: std.mem.Allocator, file_reader: *std.fs.File.Reader) ![:0]u8 {