summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/renderer.nim11
1 files changed, 10 insertions, 1 deletions
diff --git a/compiler/renderer.nim b/compiler/renderer.nim
index ce47cf219..cc1af7f75 100644
--- a/compiler/renderer.nim
+++ b/compiler/renderer.nim
@@ -1001,7 +1001,16 @@ proc gsub(g: var TSrcGen, n: PNode, c: TContext) =
   of nkCommand:
     accentedName(g, n[0])
     put(g, tkSpaces, Space)
-    gcomma(g, n, 1)
+    if n[^1].kind == nkStmtList:
+      for i, child in n:
+        if i > 1 and i < n.len - 1:
+          put(g, tkComma, ",")
+        elif i == n.len - 1:
+          put(g, tkColon, ":")
+        if i > 0:
+          gsub(g, child)
+    else:
+      gcomma(g, n, 1)
   of nkExprEqExpr, nkAsgn, nkFastAsgn:
     gsub(g, n, 0)
     put(g, tkSpaces, Space)