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 › ErrorBundle › Wip › addOtherMessage Private Function addOtherMessage Doc Source 666
667
668
669
670
671
672
673
674
675
676
677
678
679
680 fn addOtherMessage (wip : *Wip , other : ErrorBundle , msg_index : MessageIndex ) !MessageIndex {
const other_msg = other .getErrorMessage (msg_index );
const src_loc = try wip .addOtherSourceLocation (other , other_msg .src_loc );
const msg = try wip .addErrorMessage (.{
.msg = try wip .addString (other .nullTerminatedString (other_msg .msg )),
.count = other_msg .count ,
.src_loc = src_loc ,
.notes_len = other_msg .notes_len ,
});
const notes_start = try wip .reserveNotes (other_msg .notes_len );
for (notes_start .., other .getNotes (msg_index )) |note , other_note | {
wip .extra .items [note ] = @backingInt (try wip .addOtherMessage (other , other_note ));
}
return msg ;
}