summary refs log tree commit diff stats
path: root/compiler/msgs.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/msgs.nim')
-rw-r--r--compiler/msgs.nim9
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim
index 3fabf6bbf..442d9efc2 100644
--- a/compiler/msgs.nim
+++ b/compiler/msgs.nim
@@ -751,6 +751,15 @@ proc msgWriteln*(s: string) =
       when defined(windows):
         flushFile(stderr)
 
+proc stdoutWriteln*(s: string) =
+  ## Writes to stdout.
+  ## Should be used only for VM time equivalents to procs outputting to stdout.
+  if not isNil(writelnHook):
+    writelnHook(s)
+  else:
+    writeLine(stdout, s)
+    flushFile(stdout)
+
 macro callIgnoringStyle(theProc: typed, first: typed,
                         args: varargs[expr]): stmt =
   let typForegroundColor = bindSym"ForegroundColor".getType