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 › nosuspendExpr Private Function nosuspendExpr Doc Source Private Function std.zig.AstGen.nosuspendExpr
fn nosuspendExpr (
gz : *GenZir ,
scope : *Scope ,
ri : ResultInfo ,
node : Ast .Node .Index ,
) InnerError !Zir .Inst .Ref Params Errors File zig/AstGen.zig: 1211
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228 fn nosuspendExpr (
gz : *GenZir ,
scope : *Scope ,
ri : ResultInfo ,
node : Ast .Node .Index ,
) InnerError !Zir .Inst .Ref {
const astgen = gz .astgen ;
const tree = astgen .tree ;
const body_node = tree .nodeData (node ).node ;
if (gz .nosuspend_node .unwrap ()) |nosuspend_node | {
try astgen .appendErrorNodeNotes (node , "redundant nosuspend block" , .{}, &[_ ]u32 {
try astgen .errNoteNode (nosuspend_node , "other nosuspend block here" , .{}),
});
}
gz .nosuspend_node = node .toOptional ();
defer gz .nosuspend_node = .none ;
return expr (gz , scope , ri , body_node );
}