nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
modelbuilder: add option `--ignore-visibility`
[nit.git]
/
src
/
nitg.nit
diff --git
a/src/nitg.nit
b/src/nitg.nit
index
e4e965f
..
965be59
100644
(file)
--- a/
src/nitg.nit
+++ b/
src/nitg.nit
@@
-36,8
+36,10
@@
toolcontext.option_context.add_option(opt_global)
var opt_mixins = new OptionArray("Additionals module to min-in", "-m")
toolcontext.option_context.add_option(opt_mixins)
var opt_mixins = new OptionArray("Additionals module to min-in", "-m")
toolcontext.option_context.add_option(opt_mixins)
+toolcontext.tooldescription = "Usage: nitg [OPTION]... file.nit\nCompiles Nit programs."
+
# We do not add other options, so process them now!
# We do not add other options, so process them now!
-toolcontext.process_options
+toolcontext.process_options(args)
# We need a model to collect stufs
var model = new Model
# We need a model to collect stufs
var model = new Model
@@
-45,14
+47,10
@@
var model = new Model
var modelbuilder = new ModelBuilder(model, toolcontext)
var arguments = toolcontext.option_context.rest
var modelbuilder = new ModelBuilder(model, toolcontext)
var arguments = toolcontext.option_context.rest
-if arguments.is_empty then
- toolcontext.option_context.usage
- return
-end
if arguments.length > 1 then
print "Too much arguments: {arguments.join(" ")}"
if arguments.length > 1 then
print "Too much arguments: {arguments.join(" ")}"
- toolcontext.option_context.usage
- return
+ print toolcontext.tooldescription
+ exit 1
end
var progname = arguments.first
end
var progname = arguments.first