about summary refs log blame commit diff stats
path: root/src/utils/eprint.nim
blob: 6692ccf564637647d3603bebd1e8abe4971cc7b1 (plain) (tree)
1
2
3
4
5
6

        
                                                                                                     
               
            
             











                



                   
{.used.}

template 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)