implemented macros.getImpl
This commit is contained in:
parent
a2bb7d4c71
commit
695e2e970e
8 changed files with 39 additions and 2 deletions
20
tests/macros/tgetimpl.nim
Normal file
20
tests/macros/tgetimpl.nim
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue