diff --git a/src/lib.zig b/src/lib.zig index 71df6a402dea5da55a514478994ec19e975ff88d..07287c1c1f0582ccc7b9cb3b4848c8c95a9a6393 100644 --- a/src/lib.zig +++ b/src/lib.zig @@ -32,7 +32,11 @@ pub fn parse(comptime input: []const u8) astgen.Value { return astgen.Value{ .element = astgen.do(tokenize.do(input, &.{ '[', '=', ']', '(', ')', '{', '}' })) }; } -pub fn compile(writer: anytype, comptime value: astgen.Value, data: anytype, indent: usize, flag1: bool) anyerror!void { +pub fn compile(writer: anytype, comptime value: astgen.Value, data: anytype) !void { + return try do(writer, value, data, 0, false); +} + +fn do(writer: anytype, comptime value: astgen.Value, data: anytype, indent: usize, flag1: bool) anyerror!void { switch (value) { .element => |v| { const hastext = for (v.children) |x| { diff --git a/src/main.zig b/src/main.zig index b6f75c68c410c7109495d24593c0ff404a87baf7..6633f47575df93debc4b8141ea44bfb1c43e0038 100644 --- a/src/main.zig +++ b/src/main.zig @@ -29,6 +29,6 @@ pub fn main() !void { .flower = "Sunflower", }, }; - try pek.compile(std.io.getStdErr().writer(), doc, data, 0, false); + try pek.compile(std.io.getStdErr().writer(), doc, data); std.debug.print("\n", .{}); }