summary refs log blame commit diff stats
path: root/tests/macros/tdumptree.nim
blob: f540306c433b44f104414f88e22f213e025cb102 (plain) (tree)
1
2
3
4
5
6
7
8
9
           

           

             
               
           

               

                        


                    

                                                            










                                            
discard """
nimout: '''
StmtList
  VarSection
    IdentDefs
      Ident "x"
      Empty
      Call
        DotExpr
          Ident "foo"
          Ident "create"
        IntLit 56'''
"""

# disabled; can't work as the output is done by the compiler

import macros

#emit("type\n  TFoo = object\n    bar: int")

#var f: TFoo
#f.bar = 5
#echo(f.bar)

dumpTree:
  var x = foo.create(56)