Fixed order of output in repl and added a proc for opening a custom repl (#10802)

This commit is contained in:
sealmove 2019-03-10 21:02:47 +02:00 • committed by Andreas Rumpf
commit 92cd07be8b
2 changed files with 25 additions and 3 deletions

View file

@ -70,10 +70,10 @@ proc llStreamClose*(s: PLLStream) =
when not declared(readLineFromStdin):
# fallback implementation:
proc readLineFromStdin(prompt: string, line: var string): bool =
stdout.write(prompt)
stderr.write(prompt)
result = readLine(stdin, line)
if not result:
stdout.write("\n")
stderr.write("\n")
quit(0)
proc endsWith*(x: string, s: set[char]): bool =