renamed writeln to writeLine in compiler

This commit is contained in:
patrick dw 2015-06-19 01:45:12 -05:00
commit 2a0f7b5de7
8 changed files with 228 additions and 228 deletions

View file

@ -452,7 +452,7 @@ proc debug(n: PSym) =
elif n.kind == skUnknown:
msgWriteln("skUnknown")
else:
#writeln(stdout, $symToYaml(n, 0, 1))
#writeLine(stdout, $symToYaml(n, 0, 1))
msgWriteln("$1_$2: $3, $4, $5, $6" % [
n.name.s, $n.id, $flagsToStr(n.flags), $flagsToStr(n.loc.flags),
$lineInfoToStr(n.info), $n.kind])

View file

@ -596,7 +596,7 @@ proc externalFileChanged(filename: string): bool =
result = true
if result:
if open(f, crcFile, fmWrite):
f.writeln($currentCrc)
f.writeLine($currentCrc)
close(f)
proc addExternalFileToCompile*(filename: string) =

View file

@ -48,8 +48,8 @@ proc toGid(f: string): string =
proc saveMaxIds*(project: string) =
var f = open(project.toGid, fmWrite)
f.writeln($gFrontEndId)
f.writeln($gBackendId)
f.writeLine($gFrontEndId)
f.writeLine($gBackendId)
f.close()
proc loadMaxIds*(project: string) =

View file

@ -593,7 +593,7 @@ var
proc suggestWriteln*(s: string) =
if eStdOut in errorOutputs:
if isNil(writelnHook): writeln(stdout, s)
if isNil(writelnHook): writeLine(stdout, s)
else: writelnHook(s)
proc msgQuit*(x: int8) = quit x
@ -688,7 +688,7 @@ var gTrackPos*: TLineInfo
proc outWriteln*(s: string) =
## Writes to stdout. Always.
if eStdOut in errorOutputs: writeln(stdout, s)
if eStdOut in errorOutputs: writeLine(stdout, s)
proc msgWriteln*(s: string) =
## Writes to stdout. If --stdout option is given, writes to stderr instead.
@ -698,9 +698,9 @@ proc msgWriteln*(s: string) =
if not isNil(writelnHook):
writelnHook(s)
elif optStdout in gGlobalOptions:
if eStdErr in errorOutputs: writeln(stderr, s)
if eStdErr in errorOutputs: writeLine(stderr, s)
else:
if eStdOut in errorOutputs: writeln(stdout, s)
if eStdOut in errorOutputs: writeLine(stdout, s)
macro callIgnoringStyle(theProc: typed, first: typed,
args: varargs[expr]): stmt =
@ -735,13 +735,13 @@ template styledMsgWriteln*(args: varargs[expr]) =
if not isNil(writelnHook):
callIgnoringStyle(callWritelnHook, nil, args)
elif optStdout in gGlobalOptions:
if eStdErr in errorOutputs: callIgnoringStyle(writeln, stderr, args)
if eStdErr in errorOutputs: callIgnoringStyle(writeLine, stderr, args)
else:
if eStdOut in errorOutputs:
if optUseColors in gGlobalOptions:
callStyledEcho(args)
else:
callIgnoringStyle(writeln, stdout, args)
callIgnoringStyle(writeLine, stdout, args)
proc coordToStr(coord: int): string =
if coord == -1: result = "???"

View file

@ -82,7 +82,7 @@ proc processCmdLine*(pass: TCmdLinePass, cmd: string) =
proc handleCmdLine() =
if paramCount() == 0:
stdout.writeln(Usage)
stdout.writeLine(Usage)
else:
processCmdLine(passCmd1, "")
if gProjectName != "":

View file

@ -304,7 +304,7 @@ proc completeGeneratedFilePath*(f: string, createSubDir: bool = true): string =
when noTimeMachine:
excludeDirFromTimeMachine(subdir)
except OSError:
writeln(stdout, "cannot create directory: " & subdir)
writeLine(stdout, "cannot create directory: " & subdir)
quit(1)
result = joinPath(subdir, tail)
#echo "completeGeneratedFilePath(", f, ") = ", result

View file

@ -1031,28 +1031,28 @@ proc viewFile(rodfile: string) =
case section
of "CRC":
inc(r.pos) # skip ':'
outf.writeln("CRC:", $decodeVInt(r.s, r.pos))
outf.writeLine("CRC:", $decodeVInt(r.s, r.pos))
of "ID":
inc(r.pos) # skip ':'
r.moduleID = decodeVInt(r.s, r.pos)
setId(r.moduleID)
outf.writeln("ID:", $r.moduleID)
outf.writeLine("ID:", $r.moduleID)
of "ORIGFILE":
inc(r.pos)
r.origFile = decodeStr(r.s, r.pos)
outf.writeln("ORIGFILE:", r.origFile)
outf.writeLine("ORIGFILE:", r.origFile)
of "OPTIONS":
inc(r.pos) # skip ':'
r.options = cast[TOptions](int32(decodeVInt(r.s, r.pos)))
outf.writeln("OPTIONS:", $r.options)
outf.writeLine("OPTIONS:", $r.options)
of "GOPTIONS":
inc(r.pos) # skip ':'
let dep = cast[TGlobalOptions](int32(decodeVInt(r.s, r.pos)))
outf.writeln("GOPTIONS:", $dep)
outf.writeLine("GOPTIONS:", $dep)
of "CMD":
inc(r.pos) # skip ':'
let dep = cast[TCommands](int32(decodeVInt(r.s, r.pos)))
outf.writeln("CMD:", $dep)
outf.writeLine("CMD:", $dep)
of "DEFINES":
inc(r.pos) # skip ':'
var d = 0
@ -1074,7 +1074,7 @@ proc viewFile(rodfile: string) =
r.files.add(finalPath.fileInfoIdx)
inc(r.pos) # skip #10
inc(r.line)
outf.writeln finalPath
outf.writeLine finalPath
if r.s[r.pos] == ')': inc(r.pos)
outf.write(")\n")
of "INCLUDES":

View file

@ -218,12 +218,12 @@ proc cmpCandidates*(a, b: TCandidate): int =
result = complexDisambiguation(a.callee, b.callee)
proc writeMatches*(c: TCandidate) =
writeln(stdout, "exact matches: " & $c.exactMatches)
writeln(stdout, "generic matches: " & $c.genericMatches)
writeln(stdout, "subtype matches: " & $c.subtypeMatches)
writeln(stdout, "intconv matches: " & $c.intConvMatches)
writeln(stdout, "conv matches: " & $c.convMatches)
writeln(stdout, "inheritance: " & $c.inheritancePenalty)
writeLine(stdout, "exact matches: " & $c.exactMatches)
writeLine(stdout, "generic matches: " & $c.genericMatches)
writeLine(stdout, "subtype matches: " & $c.subtypeMatches)
writeLine(stdout, "intconv matches: " & $c.intConvMatches)
writeLine(stdout, "conv matches: " & $c.convMatches)
writeLine(stdout, "inheritance: " & $c.inheritancePenalty)
proc argTypeToString(arg: PNode; prefer: TPreferedDesc): string =
if arg.kind in nkSymChoices: