tdumpastgen.nim 430 B

1234567891011121314151617181920212223242526
  1. discard """
  2. msg: '''nnkStmtList.newTree(
  3. nnkVarSection.newTree(
  4. nnkIdentDefs.newTree(
  5. newIdentNode(!"x"),
  6. newEmptyNode(),
  7. nnkCall.newTree(
  8. nnkDotExpr.newTree(
  9. newIdentNode(!"foo"),
  10. newIdentNode(!"create")
  11. ),
  12. newLit(56)
  13. )
  14. )
  15. )
  16. )'''
  17. """
  18. # disabled; can't work as the output is done by the compiler
  19. import macros
  20. dumpAstGen:
  21. var x = foo.create(56)