| author | |
| committer | |
| log | fe51d7d3d53e1c9d2809624f6ab357b63b9244f1 |
| tree | 462ad218d9dfaae688a40d6e43486a15f893803e |
| parent | 72a83bf2a6767a7c87d74b26fc0b411cf86baee6 |
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 | 239 | try do(alloc, writer, bottom, data, ctx, indent, flag1); |
| 240 | 240 | } |
| 241 | 241 | } |
| 242 | ||
| 243 | fn 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 | } |