aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-11-19 20:27:42 +0100
committerAlon Zakai <alonzakai@gmail.com>2012-11-19 20:27:42 +0100
commitff8a2e5c1044e2064b4ede712e37aacac8db6a5b (patch)
treee2742f1e0983097cda50dcd6ce7740f2d47c4a77
parent7036ba306fe93dfbfc8c036f6a81379ec2466a6a (diff)
handle empty inline js
-rw-r--r--src/intertyper.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intertyper.js b/src/intertyper.js
index b1bd2ba8..8e7bb418 100644
--- a/src/intertyper.js
+++ b/src/intertyper.js
@@ -674,7 +674,7 @@ function intertyper(data, sidePass, baseLineNums) {
// Inline assembly is just JavaScript that we paste into the code
item.intertype = 'value';
if (tokensLeft[0].text == 'sideeffect') tokensLeft.splice(0, 1);
- item.ident = tokensLeft[0].text.substr(1, tokensLeft[0].text.length-2);
+ item.ident = tokensLeft[0].text.substr(1, tokensLeft[0].text.length-2) || ';'; // use ; for empty inline assembly
return { forward: null, ret: [item], item: item };
}
if (item.ident.substr(-2) == '()') {