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 library itself.
Zig › std/ › zig/ › AstGen.zig › nosuspendExpr
nosuspendExpr
AstGen.nosuspendExpr
fn nosuspendExpr (
gz : *GenZir ,
scope : *Scope ,
ri : ResultInfo ,
node : Ast .Node .Index ,
) InnerError !Zir .Inst .Ref
File
Code
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 );
}