aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-08-08 14:16:31 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-08-08 14:16:31 -0700
commitf75c7e0d0bb31871a5b1be45a35c5083508e7e83 (patch)
tree733ba9b509a2794f574969f72149e660f1e22806 /src
parent5888dfe3d8a84921baff02e4967348a58317526d (diff)
support input and output vars in inline js
Diffstat (limited to 'src')
-rw-r--r--src/intertyper.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/intertyper.js b/src/intertyper.js
index abfbdacb..dd6e5522 100644
--- a/src/intertyper.js
+++ b/src/intertyper.js
@@ -700,6 +700,12 @@ function intertyper(data, sidePass, baseLineNums) {
item.intertype = 'value';
if (tokensLeft[0].text == 'sideeffect') tokensLeft.splice(0, 1);
item.ident = tokensLeft[0].text.substr(1, tokensLeft[0].text.length-2) || ';'; // use ; for empty inline assembly
+ var i = 0;
+ splitTokenList(tokensLeft[3].item.tokens).map(function(element) {
+ var ident = toNiceIdent(element[1].text);
+ var type = element[0].text;
+ item.ident = item.ident.replace(new RegExp('\\$' + i++, 'g'), ident);
+ });
return { forward: null, ret: [item], item: item };
}
if (item.ident.substr(-2) == '()') {