summary refs log blame commit diff stats
path: root/tests/template/tissue909.nim
blob: 5b57a355827df8a6002cc38af6f927087ba4f338 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                     
import macros

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

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

test()
bar()