summary refs log tree commit diff stats
path: root/lib/core
diff options
context:
space:
mode:
Diffstat (limited to 'lib/core')
-rw-r--r--lib/core/macros.nim8
-rw-r--r--lib/core/typeinfo.nim2
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/core/macros.nim b/lib/core/macros.nim
index 334a4b8c7..455f99c9e 100644
--- a/lib/core/macros.nim
+++ b/lib/core/macros.nim
@@ -620,6 +620,8 @@ proc `body=`*(someProc: PNimrodNode, val: PNimrodNode) {.compileTime.} =
     someProc[high(someProc)] = val
   else:
     badNodeKind someProc.kind, "body=" 
+
+proc basename*(a: PNimrodNode): PNimrodNode {.compiletime.}
   
 
 proc `$`*(node: PNimrodNode): string {.compileTime.} =
@@ -627,7 +629,9 @@ proc `$`*(node: PNimrodNode): string {.compileTime.} =
   case node.kind
   of nnkIdent:
     result = $node.ident
-  of nnkStrLit:
+  of nnkPostfix:
+    result = $node.basename.ident & "*"
+  of nnkStrLit..nnkTripleStrLit:
     result = node.strVal
   else: 
     badNodeKind node.kind, "$"
@@ -669,7 +673,7 @@ proc insert*(a: PNimrodNode; pos: int; b: PNimrodNode) {.compileTime.} =
       a[i + 1] = a[i]
     a[pos] = b
 
-proc basename*(a: PNimrodNode): PNimrodNode {.compiletime.} =
+proc basename*(a: PNimrodNode): PNimrodNode =
   ## Pull an identifier from prefix/postfix expressions
   case a.kind
   of nnkIdent: return a
diff --git a/lib/core/typeinfo.nim b/lib/core/typeinfo.nim
index 57e11664b..8df1b3dfb 100644
--- a/lib/core/typeinfo.nim
+++ b/lib/core/typeinfo.nim
@@ -102,7 +102,7 @@ proc newAny(value: pointer, rawType: PNimType): TAny =
   result.value = value
   result.rawType = rawType
 
-when defined(system.TVarSlot):
+when declared(system.TVarSlot):
   proc toAny*(x: TVarSlot): TAny {.inline.} =
     ## constructs a ``TAny`` object from a variable slot ``x``. 
     ## This captures `x`'s address, so `x` can be modified with its