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 › addBreakWithSrcNode Private Function addBreakWithSrcNode Doc Source Private Function std.zig.AstGen.GenZir.addBreakWithSrcNode
fn addBreakWithSrcNode (
gz : *GenZir ,
tag : Zir .Inst .Tag ,
block_inst : Zir .Inst .Index ,
operand : Zir .Inst .Ref ,
operand_src_node : Ast .Node .Index ,
) !Zir .Inst .Index Params gz : *GenZir tag : Zir .Inst .Tag block_inst : Zir .Inst .Index operand : Zir .Inst .Ref operand_src_node : Ast .Node .Index File zig/AstGen.zig: 12125
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138 fn addBreakWithSrcNode (
gz : *GenZir ,
tag : Zir .Inst .Tag ,
block_inst : Zir .Inst .Index ,
operand : Zir .Inst .Ref ,
operand_src_node : Ast .Node .Index ,
) !Zir .Inst .Index {
const gpa = gz .astgen .gpa ;
try gz .instructions .ensureUnusedCapacity (gpa , 1 );
const new_index = try gz .makeBreakWithSrcNode (tag , block_inst , operand , operand_src_node );
gz .instructions .appendAssumeCapacity (new_index );
return new_index ;
}