summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/jsgen.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim
index b30d03579..39009bd2f 100644
--- a/compiler/jsgen.nim
+++ b/compiler/jsgen.nim
@@ -320,6 +320,10 @@ proc isSimpleExpr(p: PProc; n: PNode): bool =
     for c in n:
       if not p.isSimpleExpr(c): return false
     result = true
+  elif n.kind == nkStmtListExpr:
+    for i in 0..<n.len-1:
+      if n[i].kind notin {nkCommentStmt, nkEmpty}: return false
+    result = isSimpleExpr(p, n.lastSon)
   elif n.isAtom:
     result = true