diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/intertyper.js | 12 | ||||
-rw-r--r-- | src/jsifier.js | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/intertyper.js b/src/intertyper.js index 969a43d8..ea6b6019 100644 --- a/src/intertyper.js +++ b/src/intertyper.js @@ -400,14 +400,16 @@ function intertyper(data, parseFunctions, baseLineNum) { if (item.tokens[2].text == 'alias') { cleanOutTokens(LLVM.LINKAGES, item.tokens, 3); cleanOutTokens(LLVM.VISIBILITIES, item.tokens, 3); - Types.needAnalysis[item.tokens[3].text] = 0; - return [{ + var last = getTokenIndexByText(item.tokens, ';'); + var ret = { intertype: 'alias', ident: toNiceIdent(item.tokens[0].text), - aliasee: toNiceIdent(item.tokens[4].text), - type: item.tokens[3].text, + value: parseLLVMSegment(item.tokens.slice(3, last)), lineNum: item.lineNum - }]; + }; + ret.type = ret.value.type; + Types.needAnalysis[ret.type] = 0; + return [ret]; } if (item.tokens[2].text == 'type') { var fields = []; diff --git a/src/jsifier.js b/src/jsifier.js index b1f42567..e24b8e73 100644 --- a/src/jsifier.js +++ b/src/jsifier.js @@ -258,7 +258,7 @@ function JSify(data, functionsOnly, givenFunctions, givenGlobalVariables) { // Set the actual value in a postset, since it may be a global variable. TODO: handle alias of alias (needs ordering) ret.push({ intertype: 'GlobalVariablePostSet', - JS: item.ident + ' = ' + item.aliasee + ';' + JS: item.ident + ' = ' + finalizeLLVMParameter(item.value) + ';' }); return ret; } |