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 › overflowArithmetic Private Function overflowArithmetic Doc Source Private Function std.zig.AstGen.overflowArithmetic
fn overflowArithmetic (
gz : *GenZir ,
scope : *Scope ,
ri : ResultInfo ,
node : Ast .Node .Index ,
params : []const Ast .Node .Index ,
tag : Zir .Inst .Extended ,
) InnerError !Zir .Inst .Ref Params Errors File zig/AstGen.zig: 9965
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981 fn overflowArithmetic (
gz : *GenZir ,
scope : *Scope ,
ri : ResultInfo ,
node : Ast .Node .Index ,
params : []const Ast .Node .Index ,
tag : Zir .Inst .Extended ,
) InnerError !Zir .Inst .Ref {
const lhs = try expr (gz , scope , .{ .rl = .none }, params [0 ]);
const rhs = try expr (gz , scope , .{ .rl = .none }, params [1 ]);
const result = try gz .addExtendedPayload (tag , Zir .Inst .BinNode {
.node = gz .nodeIndexToRelative (node ),
.lhs = lhs ,
.rhs = rhs ,
});
return rvalue (gz , ri , result , node );
}