mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 01:04:43 +01:00
std.zig.putAstErrorsIntoBundle: support zon
This commit is contained in:
parent
46658257f4
commit
488832d71b
1 changed files with 13 additions and 3 deletions
|
|
@ -651,10 +651,20 @@ pub fn putAstErrorsIntoBundle(
|
|||
path: []const u8,
|
||||
wip_errors: *std.zig.ErrorBundle.Wip,
|
||||
) Allocator.Error!void {
|
||||
var zir = try AstGen.generate(gpa, tree);
|
||||
defer zir.deinit(gpa);
|
||||
switch (tree.mode) {
|
||||
.zig => {
|
||||
var zir = try AstGen.generate(gpa, tree);
|
||||
defer zir.deinit(gpa);
|
||||
|
||||
try wip_errors.addZirErrorMessages(zir, tree, tree.source, path);
|
||||
try wip_errors.addZirErrorMessages(zir, tree, tree.source, path);
|
||||
},
|
||||
.zon => {
|
||||
var zoir = try ZonGen.generate(gpa, tree, .{});
|
||||
defer zoir.deinit(gpa);
|
||||
|
||||
try wip_errors.addZoirErrorMessages(zoir, tree, tree.source, path);
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
pub fn resolveTargetQueryOrFatal(io: Io, target_query: std.Target.Query) std.Target {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue