summary refs log tree commit diff stats
path: root/tests/macros/tmacro1.nim
blob: 3a67c26113607ec4728ae6129563ea686cbd6de1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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"