summaryrefslogtreecommitdiff
path: root/lib/std/optparse.myr
diff options
context:
space:
mode:
Diffstat (limited to 'lib/std/optparse.myr')
-rw-r--r--lib/std/optparse.myr8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/std/optparse.myr b/lib/std/optparse.myr
index a2cf06c..0569dfc 100644
--- a/lib/std/optparse.myr
+++ b/lib/std/optparse.myr
@@ -153,7 +153,7 @@ const optdone = {ctx
}
const optinfo = {ctx, opt
- for o in ctx.optdef.opts
+ for o : ctx.optdef.opts
if o.opt == opt
-> `Some (o.arg.len != 0, !o.optional, o.dest)
;;
@@ -189,13 +189,13 @@ const optusage = {prog, def
sb = mksb()
std.sbfmt(sb, "usage: {} [-h?", prog)
- for o in def.opts
+ for o : def.opts
if o.arg.len == 0
std.sbfmt(sb, "{}", o.opt)
;;
;;
std.sbfmt(sb, "] ")
- for o in def.opts
+ for o : def.opts
if o.arg.len != 0
std.sbfmt(sb, "[-{} {}] ", o.opt, o.arg)
;;
@@ -203,7 +203,7 @@ const optusage = {prog, def
std.sbfmt(sb, "{}\n", def.argdesc)
std.sbfmt(sb, "\t-h\tprint this help message\n")
std.sbfmt(sb, "\t-?\tprint this help message\n")
- for o in def.opts
+ for o : def.opts
std.sbfmt(sb, "\t-{}{}{}\t{}\n", o.opt, sep(o.arg), o.arg, o.desc)
;;
s = sbfin(sb)