nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge: niunit: fix after/before test calls
[nit.git]
/
src
/
loader.nit
diff --git
a/src/loader.nit
b/src/loader.nit
index
21b7a14
..
c0891a1
100644
(file)
--- a/
src/loader.nit
+++ b/
src/loader.nit
@@
-42,13
+42,13
@@
import ini
redef class ToolContext
# Option --path
redef class ToolContext
# Option --path
- var opt_path = new OptionArray("Set include path for loaders (may be used more than once)", "-I", "--path")
+ var opt_path = new OptionArray("Add an additional include path (may be used more than once)", "-I", "--path")
# Option --only-metamodel
var opt_only_metamodel = new OptionBool("Stop after meta-model processing", "--only-metamodel")
# Option --only-parse
# Option --only-metamodel
var opt_only_metamodel = new OptionBool("Stop after meta-model processing", "--only-metamodel")
# Option --only-parse
- var opt_only_parse = new OptionBool("Only proceed to parse step of loaders", "--only-parse")
+ var opt_only_parse = new OptionBool("Only proceed to parse files", "--only-parse")
redef init
do
redef init
do
@@
-104,7
+104,7
@@
redef class ModelBuilder
if toolcontext.opt_only_parse.value then
self.toolcontext.info("*** ONLY PARSE...", 1)
if toolcontext.opt_only_parse.value then
self.toolcontext.info("*** ONLY PARSE...", 1)
- exit(0)
+ self.toolcontext.quit
end
return mmodules.to_a
end
return mmodules.to_a
@@
-152,6
+152,11
@@
redef class ModelBuilder
var mmodule = identify_module(a)
if mmodule == null then
var mmodule = identify_module(a)
if mmodule == null then
+ if a.file_exists then
+ toolcontext.error(null, "Error: `{a}` is not a Nit source file.")
+ else
+ toolcontext.error(null, "Error: cannot find module `{a}`.")
+ end
continue
end
continue
end
@@
-194,7
+199,7
@@
redef class ModelBuilder
if toolcontext.opt_only_parse.value then
self.toolcontext.info("*** ONLY PARSE...", 1)
if toolcontext.opt_only_parse.value then
self.toolcontext.info("*** ONLY PARSE...", 1)
- exit(0)
+ self.toolcontext.quit
end
return mmodules.to_a
end
return mmodules.to_a
@@
-711,8
+716,6
@@
redef class ModelBuilder
var mdoc = ndoc.to_mdoc
mmodule.mdoc = mdoc
mdoc.original_mentity = mmodule
var mdoc = ndoc.to_mdoc
mmodule.mdoc = mdoc
mdoc.original_mentity = mmodule
- else
- advice(decl, "missing-doc", "Documentation warning: Undocumented module `{mmodule}`")
end
# Is the module a test suite?
mmodule.is_test_suite = not decl.get_annotations("test_suite").is_empty
end
# Is the module a test suite?
mmodule.is_test_suite = not decl.get_annotations("test_suite").is_empty