2019-09-10 14:45:04 +00:00
|
|
|
const langs = @import("lang.zig");
|
|
|
|
|
|
|
|
pub fn printList(list: langs.CommandList, stream: var) !void {
|
2020-05-12 20:26:33 +00:00
|
|
|
for (list.items) |cmd| {
|
2020-06-02 01:14:12 +00:00
|
|
|
const command = @tagName(cmd.tag);
|
2020-01-15 01:31:20 +00:00
|
|
|
try stream.print("{}", .{command});
|
2019-09-10 14:45:04 +00:00
|
|
|
|
2020-05-12 20:26:33 +00:00
|
|
|
for (cmd.args.items) |arg| {
|
2020-01-15 01:31:20 +00:00
|
|
|
try stream.print(" {}", .{arg});
|
2019-09-10 14:45:04 +00:00
|
|
|
}
|
|
|
|
|
2020-03-26 19:35:58 +00:00
|
|
|
_ = try stream.write(";\n");
|
2019-09-10 14:45:04 +00:00
|
|
|
}
|
|
|
|
}
|