about summary refs log tree commit diff stats
path: root/src/utils/eprint.nim
blob: 1564142e1bf9b4461c3a7f1fe4b7760b3829a27c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{.used.}

func eprint*(s: varargs[string, `$`]) = {.cast(noSideEffect), cast(tags: []), cast(raises: []).}:
  var a = false
  var o = ""
  when nimVm:
    for x in s:
      if not a:
        a = true
      else:
        o &= ' '
      o &= x
    echo o
  else:
    for x in s:
      if not a:
        a = true
      else:
        o &= ' '
      o &= x
    o &= '\n'
    stderr.write(o)