stdlib, tools, and documentation. (mirror)
summary refs log blame commit diff stats
path: root/tests/trmacros/tstmtlist.nim
blob: 5202f778b0f0fcc2251ccccd2f950131c9ae532b (plain) (tree)
1
2
3
4
5
6
7
8
9

              

    



                  
             
                              

                                    



                   
                       

                   
discard """
  output: '''0
|12|
34
'''
"""

template optWrite{
  write(f, x)
  ((write|writeLine){w})(f, y)
}(x, y: varargs[expr], f, w: expr) =
  w(f, "|", x, y, "|")

if true:
  echo "0"
  write stdout, "1"
  writeLine stdout, "2"
  write stdout, "3"
  echo "4"