diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-30 17:35:06 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-30 17:35:06 -0300 |
| commit | 6d8da8721141284cf33bb901168b26135893eb86 (patch) | |
| tree | 791d63401d4e85fbca1d597a8ce0326e70efd545 /tools/gen_builtins_json.zig | |
| parent | efd43a3a2cf03bb741366331158b368abf9ac583 (diff) | |
| parent | bf6810a8f9d6cc82050e7d9c0cfb06358301b574 (diff) | |
| download | pardes-6d8da8721141284cf33bb901168b26135893eb86.tar.gz pardes-6d8da8721141284cf33bb901168b26135893eb86.zip | |
Merge latest upstream into the macOS branch for Zig 0.17
Retain the macOS branch history and local Acme selection color while adopting upstream's current core and platform changes. Pin Zig and ZLS to 0.17.0, and fetch the existing zstbi compatibility commit through upstream after its original fork was removed.
Diffstat (limited to 'tools/gen_builtins_json.zig')
| -rw-r--r-- | tools/gen_builtins_json.zig | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/gen_builtins_json.zig b/tools/gen_builtins_json.zig new file mode 100644 index 00000000..71df5307 --- /dev/null +++ b/tools/gen_builtins_json.zig @@ -0,0 +1,14 @@ +//! Writes every builtin as JSON to the path given (docs/typ/builtins-<tty|gui>.json, +//! by way of `zig build builtins-json`). +const std = @import("std"); +const pardes = @import("pardes"); + +pub fn main(init: std.process.Init) !void { + const args = try init.minimal.args.toSlice(init.arena.allocator()); + var file = try std.Io.Dir.cwd().createFile(init.io, args[1], .{}); + defer file.close(init.io); + var buf: [4096]u8 = undefined; + var w = file.writer(init.io, &buf); + try pardes.builtins_json.write(&w.interface); + try w.interface.flush(); +} |
