15 lines
354 B
Zig
15 lines
354 B
Zig
const langs = @import("lang.zig");
|
|
|
|
pub fn printList(list: langs.CommandList, stream: var) !void {
|
|
for (list.items) |cmd| {
|
|
const command = @tagName(cmd.tag);
|
|
try stream.print("{}", .{command});
|
|
|
|
for (cmd.args.items) |arg| {
|
|
try stream.print(" {}", .{arg});
|
|
}
|
|
|
|
_ = try stream.write(";\n");
|
|
}
|
|
}
|