nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lib/opts: `OptionContext::parse` use `args` by default
[nit.git]
/
lib
/
opts.nit
diff --git
a/lib/opts.nit
b/lib/opts.nit
index
3d15652
..
da78780
100644
(file)
--- a/
lib/opts.nit
+++ b/
lib/opts.nit
@@
-309,9
+309,10
@@
class OptionContext
end
end
end
end
- # Parse and assign options everywhere in the argument list
- fun parse(argv: Collection[String])
+ # Parse and assign options in `argv` or `args`
+ fun parse(argv: nullable Collection[String])
do
do
+ if argv == null then argv = args
var it = argv.iterator
parse_intern(it)
end
var it = argv.iterator
parse_intern(it)
end