Compare commits
No commits in common. "eb18d01cdd63d67fbccd54a3a336d813826c3ea2" and "c3b83c3e4b5d1a35ce7b740856b97596641303f7" have entirely different histories.
eb18d01cdd
...
c3b83c3e4b
2 changed files with 1 additions and 20 deletions
19
src/lang.zig
19
src/lang.zig
|
@ -103,19 +103,6 @@ pub const NewCommand = struct {
|
|||
rotate,
|
||||
};
|
||||
|
||||
pub fn tagToType(tag: Tag) type {
|
||||
return switch (tag) {
|
||||
.noop => Noop,
|
||||
.load => Load,
|
||||
.quicksave => Quicksave,
|
||||
.runqs => RunQS,
|
||||
|
||||
.amp => Amp,
|
||||
.rflanger => RFlanger,
|
||||
else => @panic("TODO"),
|
||||
};
|
||||
}
|
||||
|
||||
pub fn cast(base: *@This(), comptime T: type) ?*T {
|
||||
if (base.tag != T.base_tag)
|
||||
return null;
|
||||
|
@ -123,10 +110,6 @@ pub const NewCommand = struct {
|
|||
return @fieldParentPtr(T, "base", base);
|
||||
}
|
||||
|
||||
pub fn print(base: *const @This()) void {
|
||||
std.debug.warn("{}\n", .{base.tag});
|
||||
}
|
||||
|
||||
pub const Noop = struct {
|
||||
pub const base_tag = Tag.noop;
|
||||
base: NewCommand,
|
||||
|
@ -418,8 +401,6 @@ pub const Lang = struct {
|
|||
@field(cmd, cmd_field.name) = argument_value;
|
||||
}
|
||||
|
||||
cmd.base.tag = command_struct.base_tag;
|
||||
|
||||
try commands.append(cmd.base);
|
||||
}
|
||||
|
||||
|
|
|
@ -778,7 +778,7 @@ pub const Runner = struct {
|
|||
debug_flag: bool,
|
||||
) !void {
|
||||
for (cmds.items) |cmd| {
|
||||
cmd.print();
|
||||
// if (debug_flag) const_cmd.print();
|
||||
try self.newRunCommand(cmd);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue