fixing more bugs

This commit is contained in:
Mitchell Hashimoto
2022-05-21 20:39:20 -07:00
parent 02962d1437
commit b47f2e6eef
4 changed files with 62 additions and 13 deletions

View File

@@ -48,7 +48,11 @@ pub fn Stream(comptime Handler: type) type {
//log.debug("char: {x}", .{c});
const actions = self.parser.next(c);
for (actions) |action_opt| {
if (action_opt) |action| log.info("action: {}", .{action});
if (action_opt) |action| {
if (action != .print) {
log.info("action: {}", .{action});
}
}
switch (action_opt orelse continue) {
.print => |p| if (@hasDecl(T, "print")) try self.handler.print(p),
.execute => |code| try self.execute(code),