nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: add some runtime error in nitin.input
[nit.git]
/
lib
/
niti_runtime.nit
diff --git
a/lib/niti_runtime.nit
b/lib/niti_runtime.nit
index
a618fba
..
198f3a8
100644
(file)
--- a/
lib/niti_runtime.nit
+++ b/
lib/niti_runtime.nit
@@
-27,17
+27,10
@@
redef class Sys
# Read the next useful line from file-name arguments
private fun read_next_line
do
# Read the next useful line from file-name arguments
private fun read_next_line
do
- if stdin.eof then
+ while stdin.eof do
open_next_stream
end
open_next_stream
end
- var line = stdin.read_line
- loop
- if not stdin.eof then break
- open_next_stream
- if not line.is_empty then break
- line = stdin.read_line
- end
- self.line = line
+ self.line = stdin.read_line
end
# Open the next file until there is no more arguments
end
# Open the next file until there is no more arguments
@@
-45,9
+38,9
@@
redef class Sys
do
if args.is_empty then exit(0)
stdin.close
do
if args.is_empty then exit(0)
stdin.close
- stdin = new IFStream.open(args.shift)
+ stdin = new FileReader.open(args.shift)
end
# The next line to process by the main program
end
# The next line to process by the main program
- var line: String
+ var line: String is noautoinit
end
end