nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
interpreter: interpret `with` statement
[nit.git]
/
src
/
nitpretty.nit
diff --git
a/src/nitpretty.nit
b/src/nitpretty.nit
index
1d7641d
..
d759992
100644
(file)
--- a/
src/nitpretty.nit
+++ b/
src/nitpretty.nit
@@
-56,7
+56,7
@@
end
# Return result from diff between `file1` and `file2`.
private fun diff(file1, file2: String): String do
# Return result from diff between `file1` and `file2`.
private fun diff(file1, file2: String): String do
- var p = new IProcess("diff", "-u", file1, file2)
+ var p = new ProcessReader("diff", "-u", file1, file2)
var res = p.read_all
p.wait
p.close
var res = p.read_all
p.wait
p.close
@@
-108,12
+108,11
@@
if toolcontext.opt_skip_empty.value then
end
for mmodule in mmodules do
end
for mmodule in mmodules do
- if not mbuilder.mmodule2nmodule.has_key(mmodule) then
+ var nmodule = mbuilder.mmodule2node(mmodule)
+ if nmodule == null then
print " Error: no source file for module {mmodule}"
return
end
print " Error: no source file for module {mmodule}"
return
end
-
- var nmodule = mbuilder.mmodule2nmodule[mmodule]
var file = "{dir}/{mmodule.name}.nit"
var tpl = v.pretty_nmodule(nmodule)
tpl.write_to_file file
var file = "{dir}/{mmodule.name}.nit"
var tpl = v.pretty_nmodule(nmodule)
tpl.write_to_file file