'pretty' command does not exist anymore; improvements for nimfix

This commit is contained in:
Araq 2014-09-10 02:19:46 +02:00
commit 569fbe8c37
12 changed files with 69 additions and 94 deletions

View file

@ -33,7 +33,7 @@ proc loadFile*(info: TLineInfo) =
gSourceFiles[i].lines.add(line)
# extract line ending of the file:
var lex: BaseLexer
open(lex, newFileStream(path))
open(lex, newFileStream(path, fmRead))
var pos = lex.bufpos
while true:
case lex.buf[pos]
@ -43,6 +43,7 @@ proc loadFile*(info: TLineInfo) =
of '\L', '\0':
gSourceFiles[i].newline = "\L"
break
else: discard
inc pos
close(lex)