summaryrefslogtreecommitdiff
path: root/libstd
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-05-02 16:42:28 -0700
committerOri Bernstein <ori@eigenstate.org>2015-05-02 16:42:28 -0700
commit964b78805d33d3cc7d51caadf612a2125f6d2395 (patch)
tree2d14cb3d21998ef1329178f932d27fdf18198557 /libstd
parente9fb52e3870b1728bf1a7aa09beff2b0bacf6318 (diff)
downloadmc-964b78805d33d3cc7d51caadf612a2125f6d2395.tar.gz
needed => optional.
Default to option args being mandatory.
Diffstat (limited to 'libstd')
-rw-r--r--libstd/optparse.myr4
1 files changed, 2 insertions, 2 deletions
diff --git a/libstd/optparse.myr b/libstd/optparse.myr
index df8abc5..06b2093 100644
--- a/libstd/optparse.myr
+++ b/libstd/optparse.myr
@@ -21,7 +21,7 @@ pkg std =
opt : char
arg : byte[:]
desc : byte[:]
- needed : bool
+ optional : bool
;;
type optparsed = struct
@@ -127,7 +127,7 @@ const optdone = {ctx
const optinfo = {ctx, opt
for o in ctx.optdef.opts
if o.opt == opt
- -> `Some (o.arg.len != 0, o.needed)
+ -> `Some (o.arg.len != 0, !o.optional)
;;
;;
-> `None