Function getLocation [src]
Prototype
pub fn getLocation(self: @This(), diag: *const Diagnostics) Ast.Location Parameters
self: @This()diag: *const Diagnostics Source
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),
};
}