tdumptree.nim 385 B

12345678910111213141516171819202122232425262728
  1. discard """
  2. nimout: '''
  3. StmtList
  4. VarSection
  5. IdentDefs
  6. Ident "x"
  7. Empty
  8. Call
  9. DotExpr
  10. Ident "foo"
  11. Ident "create"
  12. IntLit 56'''
  13. """
  14. # disabled; can't work as the output is done by the compiler
  15. import macros
  16. #emit("type\n TFoo = object\n bar: int")
  17. #var f: TFoo
  18. #f.bar = 5
  19. #echo(f.bar)
  20. dumpTree:
  21. var x = foo.create(56)