summary refs log blame commit diff stats
path: root/tests/template/tissue909.nim
blob: 6786ff48c240de545ccb103852eea30e2bb0bcaf (plain) (tree)
1
2
3
4
5
6
7
8
9
10









                                     
                       




                        
import macros

template baz() =
  proc bar() =
    var x = 5
    iterator foo(): int {.closure.} =
      echo x
    var y = foo
    discard y()

macro test(): untyped =
  result = getAst(baz())
  echo(treeRepr(result))

test()
bar()