Rename PNimrodNode to NimNode

This commit is contained in:
def 2015-03-17 17:50:32 +01:00
commit fd4e629905
30 changed files with 508 additions and 518 deletions

View file

@ -12,7 +12,7 @@
import macros
proc createProcType(p, b: PNimrodNode): PNimrodNode {.compileTime.} =
proc createProcType(p, b: NimNode): NimNode {.compileTime.} =
#echo treeRepr(p)
#echo treeRepr(b)
result = newNimNode(nnkProcTy)
@ -44,7 +44,7 @@ proc createProcType(p, b: PNimrodNode): PNimrodNode {.compileTime.} =
formalParams.add identDefs
else:
error("Incorrect type list in proc type declaration.")
result.add formalParams
result.add newEmptyNode()
#echo(treeRepr(result))
@ -59,10 +59,10 @@ macro `=>`*(p, b: expr): expr {.immediate.} =
## f(2, 2)
##
## passTwoAndTwo((x, y) => x + y) # 4
#echo treeRepr(p)
#echo(treeRepr(b))
var params: seq[PNimrodNode] = @[newIdentNode("auto")]
var params: seq[NimNode] = @[newIdentNode("auto")]
case p.kind
of nnkPar:
@ -118,7 +118,7 @@ macro `->`*(p, b: expr): expr {.immediate.} =
##
## proc pass2(f: (float, float) -> float): float =
## f(2, 2)
##
##
## # is the same as:
##
## proc pass2(f: proc (x, y: float): float): float =