summary refs log tree commit diff stats
path: root/lib/pure/future.nim
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@googlemail.com>2015-04-30 16:09:27 +0100
committerDominik Picheta <dominikpicheta@googlemail.com>2015-04-30 16:09:27 +0100
commit0be654efe11311fcf1200c0e7dba9ecd55fa5591 (patch)
tree7f55b6c5f467a7094fb0978841a08a9b1764f0c3 /lib/pure/future.nim
parent4e778f9aac184655135daaff6579ef4a553d225a (diff)
parentd9d5aa60b7df936ffe6149143c7202604f71465f (diff)
downloadNim-0be654efe11311fcf1200c0e7dba9ecd55fa5591.tar.gz
Merge branch 'devel'
Diffstat (limited to 'lib/pure/future.nim')
-rw-r--r--lib/pure/future.nim13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/pure/future.nim b/lib/pure/future.nim
index a0c1b5c2d..661afd7b3 100644
--- a/lib/pure/future.nim
+++ b/lib/pure/future.nim
@@ -1,7 +1,7 @@
 #
 #
 #            Nim's Runtime Library
-#        (c) Copyright 2014 Dominik Picheta
+#        (c) Copyright 2015 Dominik Picheta
 #
 #    See the file "copying.txt", included in this
 #    distribution, for details about the copyright.
@@ -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 =
@@ -155,7 +155,6 @@ macro `[]`*(lc: ListComprehension, comp, typ: expr): expr =
 
   for i in countdown(comp[2].len-1, 0):
     let x = comp[2][i]
-    expectKind(x, nnkInfix)
     expectMinLen(x, 1)
     if x[0].kind == nnkIdent and $x[0].ident == "<-":
       expectLen(x, 3)