feature. See also
. The project being documented here (as the example) is the Zig library itself.
zig.putAstErrorsIntoBundle
pub fn putAstErrorsIntoBundle(
gpa: Allocator,
tree: Ast,
path: []const u8,
wip_errors: *ErrorBundle.Wip,
) Allocator.Error!void
File
Code
pub fn putAstErrorsIntoBundle(
gpa: Allocator,
tree: Ast,
path: []const u8,
wip_errors: *ErrorBundle.Wip,
) Allocator.Error!void {
switch (tree.mode) {
.zig => {
var zir = try AstGen.generate(gpa, tree);
defer zir.deinit(gpa);
try wip_errors.addZirErrorMessages(zir, tree, tree.source, path);
},
.zon => {
var zoir = try ZonGen.generate(gpa, tree, .{});
defer zoir.deinit(gpa);
try wip_errors.addZoirErrorMessages(zoir, tree, tree.source, path);
},
}
}