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 › AstGen › GenZir › addBreak Private Function addBreak Doc Source Private Function std.zig.AstGen.GenZir.addBreak
fn addBreak (
gz : *GenZir ,
tag : Zir .Inst .Tag ,
block_inst : Zir .Inst .Index ,
operand : Zir .Inst .Ref ,
) !Zir .Inst .Index Params gz : *GenZir tag : Zir .Inst .Tag block_inst : Zir .Inst .Index operand : Zir .Inst .Ref File zig/AstGen.zig: 12102
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114 fn addBreak (
gz : *GenZir ,
tag : Zir .Inst .Tag ,
block_inst : Zir .Inst .Index ,
operand : Zir .Inst .Ref ,
) !Zir .Inst .Index {
const gpa = gz .astgen .gpa ;
try gz .instructions .ensureUnusedCapacity (gpa , 1 );
const new_index = try gz .makeBreak (tag , block_inst , operand );
gz .instructions .appendAssumeCapacity (new_index );
return new_index ;
}