summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2015-05-28 14:26:55 +0200
committerAndreas Rumpf <rumpf_a@web.de>2015-05-28 14:26:55 +0200
commit852987c880debe994a5f3950349c0514b3f8ac04 (patch)
tree2844be496b7feac7c0c1c38ba24fe9bd366ac29d /compiler
parent2d2eca18b8c326f1e3ea9101d00b3370c8c5c290 (diff)
parenteec76cfc6b4c21c7deeac051442d408b7dc9f589 (diff)
downloadNim-852987c880debe994a5f3950349c0514b3f8ac04.tar.gz
Merge pull request #2829 from yglukhov/js-asm-renderer
Fixed renderer for asm node in JS
Diffstat (limited to 'compiler')
-rw-r--r--compiler/renderer.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/renderer.nim b/compiler/renderer.nim
index ffdb60696..376c0d6f7 100644
--- a/compiler/renderer.nim
+++ b/compiler/renderer.nim
@@ -767,7 +767,8 @@ proc gasm(g: var TSrcGen, n: PNode) =
   putWithSpace(g, tkAsm, "asm")
   gsub(g, n.sons[0])
   gcoms(g)
-  gsub(g, n.sons[1])
+  if n.sons.len > 1:
+    gsub(g, n.sons[1])
 
 proc gident(g: var TSrcGen, n: PNode) =
   if g.checkAnon and n.kind == nkSym and sfAnon in n.sym.flags: return