summaryrefslogtreecommitdiff
path: root/libstd
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-05-04 11:04:50 -0700
committerOri Bernstein <ori@eigenstate.org>2015-05-04 11:04:50 -0700
commitff0960cb7029fb443abc45b8961b7a1c1263752c (patch)
tree1d0883c5718d61c4441af4bbb21ac2105a3c4ba6 /libstd
parentd621aba39611ad76a69efff7d7628d56894b0d9d (diff)
downloadmc-ff0960cb7029fb443abc45b8961b7a1c1263752c.tar.gz
Init the parsed option list.
Diffstat (limited to 'libstd')
-rw-r--r--libstd/optparse.myr4
1 files changed, 4 insertions, 0 deletions
diff --git a/libstd/optparse.myr b/libstd/optparse.myr
index e9bf96e..a043263 100644
--- a/libstd/optparse.myr
+++ b/libstd/optparse.myr
@@ -53,6 +53,10 @@ const optparse = {args, def
var ctx : optctx
var parsed
+ parsed = [
+ .opts=[][:],
+ .args=[][:]
+ ]
optinit(&ctx, args, def)
while !optdone(&ctx)
parsed.opts = slpush(parsed.opts, optnext(&ctx))