Implement isExported for symbols in macros (#11963)
* Implement isExported for macros * Reimplement isExported using VM callback mechanism * VM does not support exceptions, use stacktrace() instead.
This commit is contained in:
parent
7cb31455ee
commit
d5840e1e3d
3 changed files with 23 additions and 1 deletions
10
tests/macros/tisexported.nim
Normal file
10
tests/macros/tisexported.nim
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import macros
|
||||
|
||||
proc t1* = discard
|
||||
proc t2 = discard
|
||||
|
||||
macro check(p1: typed, p2: typed) =
|
||||
doAssert isExported(p1) == true
|
||||
doAssert isExported(p2) == false
|
||||
|
||||
check t1, t2
|
||||
Loading…
Add table
Add a link
Reference in a new issue