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 library itself.

appendPossiblyRefdBodyInst

AstGen.appendPossiblyRefdBodyInst
fn appendPossiblyRefdBodyInst(
    astgen: *AstGen,
    list: *std.ArrayList(u32),
    body_inst: Zir.Inst.Index,
) void

File

lib/std/zig/AstGen.zig:13185

Code

fn appendPossiblyRefdBodyInst(
    astgen: *AstGen,
    list: *std.ArrayList(u32),
    body_inst: Zir.Inst.Index,
) void {
    list.appendAssumeCapacity(@backingInt(body_inst));
    const kv = astgen.ref_table.fetchRemove(body_inst) orelse return;
    const ref_inst = kv.value;
    return appendPossiblyRefdBodyInst(astgen, list, ref_inst);
}