From 3ea8540ec6ea689cc36a2b134879bd14c11888e0 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 7 Mar 2025 12:26:22 -0500 Subject: [PATCH] Incremental improvement to parsing `none` for optional arguments --- stdlib/stdlib.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stdlib/stdlib.c b/stdlib/stdlib.c index efee2a0..bf17aaf 100644 --- a/stdlib/stdlib.c +++ b/stdlib/stdlib.c @@ -72,6 +72,9 @@ static bool parse_single_arg(const TypeInfo_t *info, char *arg, void *dest) { if (!arg) return false; + if (info->tag == OptionalInfo && streq(arg, "none")) + return true; + while (info->tag == OptionalInfo) info = info->OptionalInfo.type;