mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
compiler,std: implement ZON support
This commit allows using ZON (Zig Object Notation) in a few ways. * `@import` can be used to load ZON at comptime and convert it to a normal Zig value. In this case, `@import` must have a result type. * `std.zon.parse` can be used to parse ZON at runtime, akin to the parsing logic in `std.json`. * `std.zon.stringify` can be used to convert arbitrary data structures to ZON at runtime, again akin to `std.json`.
This commit is contained in:
+1
-1
@@ -6278,7 +6278,7 @@ fn cmdAstCheck(
|
||||
}
|
||||
},
|
||||
.zon => {
|
||||
const zoir = try ZonGen.generate(gpa, file.tree);
|
||||
const zoir = try ZonGen.generate(gpa, file.tree, .{});
|
||||
defer zoir.deinit(gpa);
|
||||
|
||||
if (zoir.hasCompileErrors()) {
|
||||
|
||||
Reference in New Issue
Block a user