diff options
author | nc-x <neelesh.chandola@outlook.com> | 2019-08-18 15:21:28 +0530 |
---|---|---|
committer | Arne Döring <arne.doering@gmx.net> | 2019-08-18 11:51:28 +0200 |
commit | d5840e1e3d186a3b54859f3b1609b96975748372 (patch) | |
tree | a7dde3b2e34536c80521d5fb14e72c4635a54985 /lib/core | |
parent | 7cb31455ee949ee006e2f314daa74866cf37a74e (diff) | |
download | Nim-d5840e1e3d186a3b54859f3b1609b96975748372.tar.gz |
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.
Diffstat (limited to 'lib/core')
-rw-r--r-- | lib/core/macros.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/core/macros.nim b/lib/core/macros.nim index 3fe53f6f5..4e44b9b4f 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -1611,3 +1611,6 @@ when defined(nimMacrosSizealignof): ## from a field of a type. Therefore it only requires one argument ## instead of two. Returns a negative value if the Nim compiler ## does not know the offset. + +proc isExported*(n: NimNode): bool {.noSideEffect.} = + ## Returns whether the symbol is exported or not. |