fn errNoteNode(zg: *ZonGen, node: Ast.Node.Index, comptime format: []const u8, args: anytype) Allocator.Error!Zoir.CompileError.Note 811
812
813
814
815
816
817
818
819fn errNoteNode(zg: *ZonGen, node: Ast.Node.Index, comptime format: []const u8, args: anytype) Allocator.Error!Zoir.CompileError.Note {
const message_idx: u32 = @intCast(zg.string_bytes.items.len);
try zg.string_bytes.print(zg.gpa, format ++ "\x00", args);
return .{
.msg = @fromBackingInt(@intCast(message_idx)),
.token = .none,
.node_or_offset = @backingInt(node),
};
}