diff options
author | Araq <rumpf_a@web.de> | 2015-02-27 16:44:43 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-02-27 16:44:55 +0100 |
commit | 3bfcfeb0cffa266b45f0803009787d7761881326 (patch) | |
tree | 13740cd238c5c72772baed5c6241c3dd6aa18eaa /lib/core/macros.nim | |
parent | 05233de66cbe4a1878e8d83b7bc8fb9df20d8ff1 (diff) | |
download | Nim-3bfcfeb0cffa266b45f0803009787d7761881326.tar.gz |
don't use stdout for nimsuggest server mode
Diffstat (limited to 'lib/core/macros.nim')
-rw-r--r-- | lib/core/macros.nim | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/core/macros.nim b/lib/core/macros.nim index dbfb2ceb3..4758dc0c1 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -456,10 +456,11 @@ proc lispRepr*(n: PNimrodNode): string {.compileTime, benign.} = of nnkSym: add(result, $n.symbol) of nnkNone: assert false else: - add(result, lispRepr(n[0])) - for j in 1..n.len-1: - add(result, ", ") - add(result, lispRepr(n[j])) + if n.len > 0: + add(result, lispRepr(n[0])) + for j in 1..n.len-1: + add(result, ", ") + add(result, lispRepr(n[j])) add(result, ")") |