From f20079b807f5d0a015024f8a9242da21706787c1 Mon Sep 17 00:00:00 2001 From: Luna Date: Sat, 30 May 2020 22:25:43 -0300 Subject: [PATCH] disable codepaths not supporting new commands --- src/main.zig | 3 ++- src/runner.zig | 14 ++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/main.zig b/src/main.zig index 04bcf2d..9971f24 100644 --- a/src/main.zig +++ b/src/main.zig @@ -185,7 +185,8 @@ pub fn main() !void { const scri_path = try (args_it.next(allocator) orelse @panic("expected scri path or 'repl'")); if (std.mem.eql(u8, scri_path, "repl")) { - return try doRepl(allocator, &args_it); + @panic("TODO bring repl back"); + // return try doRepl(allocator, &args_it); } var file = try std.fs.cwd().openFile(scri_path, .{}); diff --git a/src/runner.zig b/src/runner.zig index 6276954..5496e8a 100644 --- a/src/runner.zig +++ b/src/runner.zig @@ -374,6 +374,8 @@ pub const Runner = struct { try image.runPlugin("http://calf.sourceforge.net/plugins/VintageDelay", pos, params); } + fn newRunCommand(self: *@This(), cmd: lang.NewCommand) !void {} + fn runCommand(self: *Runner, cmd: *lang.Command) !void { var params = ParamList.init(self.allocator); defer params.deinit(); @@ -775,14 +777,10 @@ pub const Runner = struct { cmds: lang.CommandList, debug_flag: bool, ) !void { - for (cmds.items) |const_cmd| { - if (debug_flag) const_cmd.print(); - - // copy the command so we own its memory - var cmd = try const_cmd.copy(self.allocator); - defer self.allocator.destroy(cmd); - - try self.runCommand(cmd); + for (cmds.items) |cmd| { + // TODO + // if (debug_flag) const_cmd.print(); + try self.newRunCommand(cmd); } } };