const langs = @import("lang.zig"); pub fn printList(list: langs.CommandList, stream: var) !void { for (list.toSlice()) |cmd| { var command = switch (cmd.command) { .Noop => "noop", .Load => "load", .Quicksave => "quicksave", .RunQS => "runqs", .Amp => "amp", .RFlanger => "rflanger", .Eq => "eq", .Phaser => "phaser", .Mbeq => "mbeq", .Chorus => "chorus", .PitchScaler => "pitchscaler", .Reverb => "reverb", .Highpass => "highpass", .Delay => "delay", .Vinyl => "vinyl", .RevDelay => "revdelay", .Gate => "gate", .Detune => "detune", .Overdrive => "overdrive", .Degrade => "Degrade", .RePsycho => "repsycho", .TalkBox => "talkbox", .DynComp => "dyncomp", .ThruZero => "thruzero", .Foverdrive => "foverdrive", .Noise => "noise", .WildNoise => "wildnoise", .Write => "write", .Embed => "embed", .Rotate => "rotate", }; try stream.print("{}", .{command}); for (cmd.args.toSlice()) |arg| { try stream.print(" {}", .{arg}); } try stream.write(";\n"); } }