authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-08-14 14:23:46 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-08-14 14:23:46 -07:00
logfe51d7d3d53e1c9d2809624f6ab357b63b9244f1
tree462ad218d9dfaae688a40d6e43486a15f893803e
parent72a83bf2a6767a7c87d74b26fc0b411cf86baee6

add missing FnArgsTuple definition


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

src/lib.zig+8
...@@ -239,3 +239,11 @@ fn docap(alloc: *std.mem.Allocator, writer: anytype, comptime top: astgen.Value,...@@ -239,3 +239,11 @@ fn docap(alloc: *std.mem.Allocator, writer: anytype, comptime top: astgen.Value,
239 try do(alloc, writer, bottom, data, ctx, indent, flag1);239 try do(alloc, writer, bottom, data, ctx, indent, flag1);
240 }240 }
241}241}
242
243fn FnArgsTuple(func: anytype) type {
244 var types: []const type = &.{};
245 inline for (@typeInfo(@TypeOf(func)).Fn.args) |arg| {
246 types = types ++ &[_]type{arg.arg_type.?};
247 }
248 return std.meta.Tuple(types);
249}