Make sure there are no errors after parsing generated Zig

This commit is contained in:
Robin Voetter
2021-09-07 03:40:24 +02:00
parent d800f1f9a9
commit 5f9c17de9a

View File

@@ -80,6 +80,7 @@ pub const GenerateStep = struct {
const src = out_buffer.items[0 .. out_buffer.items.len - 1 :0];
const tree = try std.zig.parse(self.builder.allocator, src);
std.debug.assert(tree.errors.len == 0); // If this triggers, vulkan-zig produced invalid code.
var formatted = try tree.render(self.builder.allocator);