Quick actions

cmd+k|ctrl+k

Navigation

Languages

Untitled

Snippet info

Language

Nim

Visibility

unlisted

Author

legacy-anonymous

Created

2017-04-17T23:48:25Z

Updated

2017-04-17T23:48:25Z

import macros

proc foo(bar: float): float = bar

macro print(node: typed) :untyped = 
  echo treerepr getImpl(node.symbol)

macro print2(node:typed):untyped =
  echo treerepr gettypeImpl(node)
  

print(foo) # this also echoes the body
print2(foo)
INFO