Merge remote-tracking branch 'nim-lang/devel' into emscripten-support

This commit is contained in:
Andrey Sobolev
2015-09-23 10:16:36 +06:00
10 changed files with 61 additions and 43 deletions

View File

@@ -75,7 +75,7 @@ macro `=>`*(p, b: expr): expr {.immediate.} =
identDefs.add(newEmptyNode())
of nnkIdent:
identDefs.add(c)
identDefs.add(newEmptyNode())
identDefs.add(newIdentNode("auto"))
identDefs.add(newEmptyNode())
of nnkInfix:
if c[0].kind == nnkIdent and c[0].ident == !"->":
@@ -93,7 +93,7 @@ macro `=>`*(p, b: expr): expr {.immediate.} =
of nnkIdent:
var identDefs = newNimNode(nnkIdentDefs)
identDefs.add(p)
identDefs.add(newEmptyNode())
identDefs.add(newIdentNode("auto"))
identDefs.add(newEmptyNode())
params.add(identDefs)
of nnkInfix:

View File

@@ -2235,7 +2235,9 @@ proc `$`*[T: tuple|object](x: T): string =
firstElement = false
result.add(")")
proc collectionToString[T](x: T, b, e: string): string =
proc collectionToString[T: set | seq](x: T, b, e: string): string =
when x is seq:
if x.isNil: return "nil"
result = b
var firstElement = true
for value in items(x):