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 › divBuiltin Private Function divBuiltin Doc Source Private Function std.zig.AstGen.divBuiltin
fn divBuiltin (
gz : *GenZir ,
scope : *Scope ,
ri : ResultInfo ,
node : Ast .Node .Index ,
lhs_node : Ast .Node .Index ,
rhs_node : Ast .Node .Index ,
tag : Zir .Inst .Tag ,
) InnerError !Zir .Inst .Ref Params Errors File zig/AstGen.zig: 9898
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914 fn divBuiltin (
gz : *GenZir ,
scope : *Scope ,
ri : ResultInfo ,
node : Ast .Node .Index ,
lhs_node : Ast .Node .Index ,
rhs_node : Ast .Node .Index ,
tag : Zir .Inst .Tag ,
) InnerError !Zir .Inst .Ref {
const cursor = maybeAdvanceSourceCursorToMainToken (gz , node );
const lhs = try expr (gz , scope , .{ .rl = .none }, lhs_node );
const rhs = try expr (gz , scope , .{ .rl = .none }, rhs_node );
try emitDbgStmt (gz , cursor );
const result = try gz .addPlNode (tag , node , Zir .Inst .Bin { .lhs = lhs , .rhs = rhs });
return rvalue (gz , ri , result , node );
}