authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-08-06 02:16:26 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-08-06 02:16:26 -07:00
loge138d32d1a042dff857a6d3a73ec058051b463d5
treef07acdf57cf94e3fb4abef3d505bd2bcd8a75ad7
parent595471f38abf012c68d0cfe4b8667d904b6f920a

add internal function to hide certain default fields


2 files changed, 6 insertions(+), 2 deletions(-)

src/lib.zig+5-1
......@@ -32,7 +32,11 @@ pub fn parse(comptime input: []const u8) astgen.Value {
3232 return astgen.Value{ .element = astgen.do(tokenize.do(input, &.{ '[', '=', ']', '(', ')', '{', '}' })) };
3333}
3434
35pub fn compile(writer: anytype, comptime value: astgen.Value, data: anytype, indent: usize, flag1: bool) anyerror!void {
35pub fn compile(writer: anytype, comptime value: astgen.Value, data: anytype) !void {
36 return try do(writer, value, data, 0, false);
37}
38
39fn do(writer: anytype, comptime value: astgen.Value, data: anytype, indent: usize, flag1: bool) anyerror!void {
3640 switch (value) {
3741 .element => |v| {
3842 const hastext = for (v.children) |x| {
src/main.zig+1-1
......@@ -29,6 +29,6 @@ pub fn main() !void {
2929 .flower = "Sunflower",
3030 },
3131 };
32 try pek.compile(std.io.getStdErr().writer(), doc, data, 0, false);
32 try pek.compile(std.io.getStdErr().writer(), doc, data);
3333 std.debug.print("\n", .{});
3434}