From d5840e1e3d186a3b54859f3b1609b96975748372 Mon Sep 17 00:00:00 2001 From: nc-x Date: Sun, 18 Aug 2019 15:21:28 +0530 Subject: 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. --- lib/core/macros.nim | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/core') 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. -- cgit 1.4.1-2-gfad0