This commit is contained in:
agra
2026-02-11 14:07:43 +02:00
parent cdc6c59dda
commit 94b0296fd5
11 changed files with 406 additions and 674 deletions

View File

@@ -93,18 +93,6 @@ pub const Compilation = struct {
}
pub fn renderErrors(self: *const Compilation) void {
for (self.diagnostics.items.items) |d| {
const level_str = switch (d.level) {
.err => "error",
.warn => "warning",
.note => "note",
};
if (d.span) |span| {
const loc = errors.SourceLoc.compute(self.source, span.start);
std.debug.print("{s}:{d}:{d}: {s}: {s}\n", .{ self.file_path, loc.line, loc.col, level_str, d.message });
} else {
std.debug.print("{s}: {s}: {s}\n", .{ self.file_path, level_str, d.message });
}
}
self.diagnostics.renderDebug();
}
};