fn errNoteTok(zg: *ZonGen, tok: Ast.TokenIndex, comptime format: []const u8, args: anytype) Allocator.Error!Zoir.CompileError.Note zg: *ZonGentok: Ast.TokenIndexformat: []const u8args821
822
823
824
825
826
827
828
829fn errNoteTok(zg: *ZonGen, tok: Ast.TokenIndex, 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 = .fromToken(tok),
.node_or_offset = 0,
};
}