From 6ea8d9f07367a52b335deaf2dcbb6e44ab6640cd Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Sat, 20 May 2023 10:53:07 -0700 Subject: [PATCH] add compileInner for use in custom raw functions --- src/lib.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib.zig b/src/lib.zig index 00e48ac222bacdc05e3e13c56a6117f0b7d47940..cd9d1a6056ceb47b144920e7ded9763f091c172b 100644 --- a/src/lib.zig +++ b/src/lib.zig @@ -30,6 +30,11 @@ pub fn compile(comptime Ctx: type, alloc: std.mem.Allocator, writer: anytype, co try writer.writeAll("\n"); } +pub fn compileInner(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, comptime opts: DoOptions, data: anytype) !void { + try do(alloc, writer, value, data, data, opts); + try writer.writeAll("\n"); +} + pub const Writer = std.ArrayList(u8).Writer; inline fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, data: anytype, ctx: anytype, comptime opts: DoOptions) anyerror!void { -- 2.54.0