summaryrefslogtreecommitdiff
path: root/lib/std/optparse.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@markovcorp.com>2017-07-17 15:30:01 -0700
committerOri Bernstein <ori@markovcorp.com>2017-07-17 15:30:01 -0700
commit492aca3ff6f829ee09c52e17c86a808430ee7df4 (patch)
treef97424e14c9d3277c78ff53082daec725e1f4dcb /lib/std/optparse.myr
parent11f79ed8ff75049f6b1866d70bc032c8d18b1463 (diff)
downloadmc-492aca3ff6f829ee09c52e17c86a808430ee7df4.tar.gz
Convert from `in` to `:`.
The winds of change are a-blowin.
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)