diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-01-08 18:22:18 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-01-08 18:22:18 +0100 |
commit | c924fac5c889c5eace083707e62c60f16544573b (patch) | |
tree | 94319dcead10f62a11c70b0293dfc100a1ef6b30 /compiler | |
parent | ceb8ba49576ed0f27cf6ec031369c42ddf68757d (diff) | |
download | Nim-c924fac5c889c5eace083707e62c60f16544573b.tar.gz |
fixes #7019
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/renderer.nim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/renderer.nim b/compiler/renderer.nim index 6735cc1ce..c45de0db9 100644 --- a/compiler/renderer.nim +++ b/compiler/renderer.nim @@ -898,6 +898,14 @@ proc gsub(g: var TSrcGen, n: PNode, c: TContext) = put(g, tkBracketLe, "[") gcomma(g, n, 2) put(g, tkBracketRi, "]") + elif n.len > 1 and n.lastSon.kind == nkStmtList: + gsub(g, n[0]) + if n.len > 2: + put(g, tkParLe, "(") + gcomma(g, n, 1, -2) + put(g, tkParRi, ")") + put(g, tkColon, ":") + gsub(g, n, n.len-1) else: if sonsLen(n) >= 1: gsub(g, n.sons[0]) put(g, tkParLe, "(") |