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. Public Function
pubfninit(bitcode: *BcWriter, comptimeparent_abbrev_len: u6, comptimedefine_abbrevs: bool) Error!Self {
trybitcode.writeBits(1, parent_abbrev_len);
trybitcode.writeVbr(Block.id, 8);
trybitcode.writeVbr(abbrev_len, 4);
trybitcode.alignTo32();
// We store the index of the block size and store a dummy value as the number of words in the blockconststart = bitcode.length();
trybitcode.writeBits(0, 32);
varself = Self{
.start = start,
.bitcode = bitcode,
};
// Predefine all block abbrevsif (define_abbrevs) {
inlinefor (Block.abbrevs) |Abbrev| {
tryself.defineAbbrev(&Abbrev.ops);
}
}
returnself;
}