# Here we load an process all modules passed on the command line
var mmodules = modelbuilder.parse(arguments)
-if mmodules.is_empty then
- toolcontext.check_errors
- toolcontext.errors_info
- if toolcontext.error_count > 0 then exit(1) else exit(0)
-end
+if mmodules.is_empty then toolcontext.quit
modelbuilder.run_phases
if toolcontext.opt_only_parse.value then
self.toolcontext.info("*** ONLY PARSE...", 1)
- exit(0)
+ self.toolcontext.quit
end
return mmodules.to_a
if toolcontext.opt_only_parse.value then
self.toolcontext.info("*** ONLY PARSE...", 1)
- exit(0)
+ self.toolcontext.quit
end
return mmodules.to_a
if toolcontext.opt_only_metamodel.value then
self.toolcontext.info("*** ONLY METAMODEL", 1)
- exit(0)
+ toolcontext.quit
end
end
modelbuilder.run_phases
-if toolcontext.opt_only_metamodel.value then exit(0)
+if toolcontext.opt_only_metamodel.value then toolcontext.quit
var mainmodule = toolcontext.make_main_module(mmodules)
mmodules.add_all modelbuilder.parse(opt_mixins.value)
modelbuilder.run_phases
-if toolcontext.opt_only_metamodel.value then exit(0)
+if toolcontext.opt_only_metamodel.value then toolcontext.quit
var mainmodule: nullable MModule