Zig 0.17.0-dev (Split by item) This is an example of documentation generated by
ZigDoc , an alternative to Zig's built-in
Auto Doc feature. See also
examples in other modes/formats . The project being documented here (as the example) is the Zig standard library.
std › zig › putAstErrorsIntoBundle Public Function putAstErrorsIntoBundle Doc Source Public Function std.zig.putAstErrorsIntoBundle
pub fn putAstErrorsIntoBundle (
gpa : Allocator ,
tree : Ast ,
path : []const u8 ,
wip_errors : *ErrorBundle .Wip ,
) Allocator .Error !void Params File zig.zig: 741
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761 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 );
},
}
}