cleanup
This commit is contained in:
14
src/core.zig
14
src/core.zig
@@ -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();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user