summaryrefslogtreecommitdiff
path: root/src/cli/args.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli/args.zig')
-rw-r--r--src/cli/args.zig5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cli/args.zig b/src/cli/args.zig
index fcb4c039c..eb91c43a8 100644
--- a/src/cli/args.zig
+++ b/src/cli/args.zig
@@ -64,6 +64,11 @@ pub fn parse(comptime T: type, alloc: Allocator, dst: *T, iter: anytype) !void {
};
while (iter.next()) |arg| {
+ // Do manual parsing if we have a hook for it.
+ if (@hasDecl(T, "parseManuallyHook")) {
+ if (!try dst.parseManuallyHook(arena_alloc, arg, iter)) return;
+ }
+
if (mem.startsWith(u8, arg, "--")) {
var key: []const u8 = arg[2..];
const value: ?[]const u8 = value: {