add random debug statements
This commit is contained in:
parent
7d519b73b6
commit
d518369314
2 changed files with 11 additions and 2 deletions
|
@ -124,7 +124,7 @@ pub const NewCommand = struct {
|
|||
}
|
||||
|
||||
pub fn print(base: *const @This()) void {
|
||||
std.debug.warn("{}\n", .{base.tag});
|
||||
std.debug.warn("tag: {}\n", .{base.tag});
|
||||
}
|
||||
|
||||
pub const Noop = struct {
|
||||
|
|
|
@ -381,6 +381,7 @@ pub const Runner = struct {
|
|||
) !void {
|
||||
comptime const typ = lang.NewCommand.tagToType(tag);
|
||||
const command = cmd.cast(typ).?;
|
||||
std.debug.warn("{} {}\n", .{ command.path.ptr, command.path.len });
|
||||
|
||||
std.debug.warn("{}\n", .{command});
|
||||
}
|
||||
|
@ -795,7 +796,15 @@ pub const Runner = struct {
|
|||
) !void {
|
||||
for (cmds.items) |cmd| {
|
||||
cmd.print();
|
||||
try self.newRunCommand(cmd);
|
||||
|
||||
switch (cmd.tag) {
|
||||
.load => {
|
||||
const proper_cmd = cmd.cast(lang.NewCommand.Load).?;
|
||||
std.debug.warn("got load! {}\n", .{proper_cmd});
|
||||
},
|
||||
else => @panic("TODO"),
|
||||
}
|
||||
try self.newRunCommand(cmd.*);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue