I am writing a macro which need to know if a type symbol is exported or not. But the getImpl doesn't contain export flag. The following code:
import macros
type
T1* = object
macro m1(t: typed): untyped =
echo t.getImpl.treeRepr
m1(T1)
The result is:
TypeDef
Sym "T1"
Empty
ObjectTy
Empty
Empty
Empty
Is there any way to get the export flag or other way to check if the symbol is exported or not? Thanks.
I need a typed symbol.
Thank you. :)