disable codepaths not supporting new commands

This commit is contained in:
Luna 2020-05-30 22:25:43 -03:00
parent 154032f9b1
commit f20079b807
2 changed files with 8 additions and 9 deletions

View file

@ -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, .{});

View file

@ -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);
}
}
};