frontend: collect independent source diagnostics without cascades

This commit is contained in:
dev committed 2026-10-09 16:01:18 +03:00
1 parent 2c6c7a3dcd
commit 4cda44823d
47 files changed
+697 -44

No files matched your search

+14
View File
@@ -171,6 +171,13 @@ fn run(io: std.Io, arena: std.mem.Allocator, args: []const [:0]const u8, out: *s
try out.writeByte('\n');
return .rejected;
},
.errors => |ds| {
for (ds) |d| {
try d.writeJson(out);
try out.writeByte('\n');
}
return .rejected;
},
.unimplemented => |what| {
std.debug.print("aji: not implemented yet: {s}\n", .{what});
return .unimplemented;
@@ -526,6 +533,13 @@ fn formatCommand(io: std.Io, arena: std.mem.Allocator, arguments: []const [:0]co
try out.writeByte('\n');
return .rejected;
},
.errors => |fs| {
for (try aji.frontend.syntaxDiagnostics(arena, path, fs)) |d| {
try d.writeJson(out);
try out.writeByte('\n');
}
return .rejected;
},
.ok => |text| text,
};
if (mode == .stdout) {