mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 18:02:05 +00:00
23 lines
297 B
Nim
23 lines
297 B
Nim
import macros
|
|
|
|
from uri import `/`
|
|
|
|
macro test*(a: untyped): untyped =
|
|
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"
|