summaryrefslogtreecommitdiff
path: root/src/symtable.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/symtable.zig')
-rw-r--r--src/symtable.zig8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/symtable.zig b/src/symtable.zig
index 71596e2..3017670 100644
--- a/src/symtable.zig
+++ b/src/symtable.zig
@@ -204,6 +204,7 @@ pub const Populator = struct {
try value.expr.inferType(self.allocator, table),
false,
);
+ std.debug.print("Value: {s}\nSymbol: {any}\n", .{ value.ident.ident, symbol });
if (!try table.insert(value.ident.ident, symbol)) return error.FailedToInsert;
},
.block => {
@@ -231,8 +232,12 @@ pub const Populator = struct {
},
.exit => |exit| _ = try exit.inferType(self.allocator, table),
.expr => {},
+ .ifstmt => for (try stmt.children(self.allocator)) |c| try self.populateSymtable(&c),
- // else => return error.Unimplemented,
+ // else => |unim| return errorblk: {
+ // std.debug.print("Error: Unimplemented: {any}\n", .{unim});
+ // break :errorblk error.Unimplemented;
+ // },
}
},
else => {
@@ -294,7 +299,6 @@ pub const Populator = struct {
};
return value.toSymb();
}
- // std.debug.print("{s}: ", .{typ.ident});
return error.UnknownType;
}
};