implemented macros.getImpl

This commit is contained in:
Araq
2015-08-21 02:34:34 +02:00
parent a2bb7d4c71
commit 695e2e970e
8 changed files with 39 additions and 2 deletions

20
tests/macros/tgetimpl.nim Normal file
View File

@@ -0,0 +1,20 @@
discard """
msg: '''"muhaha"
proc poo(x, y: int) =
echo ["poo"]'''
"""
import macros
const
foo = "muhaha"
proc poo(x, y: int) =
echo "poo"
macro m(x: typed): untyped =
echo repr x.symbol.getImpl
result = x
discard m foo
discard m poo