nosuspendExpr
Function parameters
Parameters
- gz:*GenZir
- scope:*Scope
- node:Ast.Node.Index
Functions in this namespace
Functions
Source
Implementation
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);
}