authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-05-15 19:53:09 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-05-15 19:53:09 -07:00
logd38b56047812d06af569a167c5b0783ecd8bb3ee
treeb83bfb66d36d8310f5e9846f8a0db59c8e26b1e5
parent86847689442589595adcef24fc217dd5301faf90

add more warnings to describe the custom function transition


1 files changed, 6 insertions(+), 0 deletions(-)

src/lib.zig+6
......@@ -198,6 +198,12 @@ inline fn do(comptime Ctx: type, alloc: std.mem.Allocator, writer: anytype, comp
198198 try do(Ctx, alloc, writer, repvalue, try list.toOwnedSlice(), ctx, opts);
199199 return;
200200 }
201 if (v.raw and @hasDecl(Ctx, "pek_" ++ v.name)) {
202 @compileError("pek: attempted to call safe custom function: '" ++ v.name ++ "' but did not use '{" ++ v.name ++ "}'");
203 }
204 if (!v.raw and @hasDecl(Ctx, "pek__" ++ v.name)) {
205 @compileError("pek: attempted to call raw custom function: '_" ++ v.name ++ "' but did not use '{#" ++ v.name ++ "}'");
206 }
201207 @compileError("pek: unknown custom function: " ++ v.name);
202208 },
203209 else => unreachable,