pub fn getLocation(self: @This(), diag: *const Diagnostics) Ast.Location self: @This()diag: *const Diagnostics164
165
166
167
168
169
170
171
172
173 pub fn getLocation(self: @This(), diag: *const Diagnostics) Ast.Location {
return switch (self) {
.zoir => |err| return zoirErrorLocation(
diag.ast,
err.token,
err.node_or_offset,
),
.type_check => |err| return diag.ast.tokenLocation(err.offset, err.token),
};
}