Files
Nim/tests/macros/tmacro1.nim
2015-03-17 17:50:32 +01:00

24 lines
306 B
Nim

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"