Source
pub fn format(self: *const @This(), w: *std.Io.Writer) std.Io.Writer.Error!void {
var errors = self.iterateErrors();
while (errors.next()) |err| {
const loc = err.getLocation(self);
const msg = err.fmtMessage(self);
try w.print("{d}:{d}: error: {f}\n", .{ loc.line + 1, loc.column + 1, msg });
var notes = err.iterateNotes(self);
while (notes.next()) |note| {
const note_loc = note.getLocation(self);
const note_msg = note.fmtMessage(self);
try w.print("{d}:{d}: note: {f}\n", .{
note_loc.line + 1,
note_loc.column + 1,
note_msg,
});
}
}
}