Merge: Added contributing guidelines and link from readme
[nit.git] / src / nit.nit
index 196961d..a28bb6f 100644 (file)
@@ -64,13 +64,19 @@ if opt_eval.value then
        modelbuilder.load_rt_module(parent, amodule, "-")
 
        mmodules = [amodule.mmodule.as(not null)]
+else if progname == "-" then
+       var content = stdin.read_all
+       var amodule = toolcontext.parse_module(content)
+       toolcontext.check_errors
+       modelbuilder.load_rt_module(null, amodule, "-")
+       mmodules = [amodule.mmodule.as(not null)]
 else
        mmodules = modelbuilder.parse([progname])
 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)