frontend: collect independent source diagnostics without cascades
This commit is contained in:
1 parent
2c6c7a3dcd
commit
4cda44823d
47 files changed
+697
-44
No files matched your search
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user