nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge: Added contributing guidelines and link from readme
[nit.git]
/
src
/
nit.nit
diff --git
a/src/nit.nit
b/src/nit.nit
index
9410b4d
..
a28bb6f
100644
(file)
--- a/
src/nit.nit
+++ b/
src/nit.nit
@@
-64,6
+64,12
@@
if opt_eval.value then
modelbuilder.load_rt_module(parent, amodule, "-")
mmodules = [amodule.mmodule.as(not null)]
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
else
mmodules = modelbuilder.parse([progname])
end