diff options
Diffstat (limited to 'lib/core/macros.nim')
-rw-r--r-- | lib/core/macros.nim | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/core/macros.nim b/lib/core/macros.nim index 7b03d4e4d..e4a56d6f9 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -277,9 +277,12 @@ else: # bootstrapping substitute {.pop.} -when defined(nimSymImplTransform): +when (NimMajor, NimMinor, NimPatch) >= (1, 3, 5) or defined(nimSymImplTransform): proc getImplTransformed*(symbol: NimNode): NimNode {.magic: "GetImplTransf", noSideEffect.} - ## For a typed proc returns the AST after transformation pass. + ## For a typed proc returns the AST after transformation pass; this is useful + ## for debugging how the compiler transforms code (eg: `defer`, `for`) but + ## note that code transformations are implementation dependent and subject to change. + ## See an example in `tests/macros/tmacros_various.nim`. when defined(nimHasSymOwnerInMacro): proc owner*(sym: NimNode): NimNode {.magic: "SymOwner", noSideEffect.} |