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

              

                   
                                          
                             

               
 





                       
 





                
 
import  macros

from uri import `/`

macro test*(a: stmt): stmt {.immediate.} =
  var nodes: tuple[a, b: int]
  nodes.a = 4
  nodes[1] = 45

  type
    TTypeEx = object
      x, y: int
      case b: bool
      of false: nil
      of true: z: float

  var t: TTypeEx
  t.b = true
  t.z = 4.5

test:
  "hi"