diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-06-28 14:15:26 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-07-03 15:31:03 -0700 |
commit | 0de466d64e4cf3e8466c03731f18012688d5ea78 (patch) | |
tree | 826bc539fcf76b5c3f1c393e7864895470a5404f /emlink.py | |
parent | 077b37c1f617f2a962b99ec55aca9e465086b3df (diff) |
apply replacements to exports
Diffstat (limited to 'emlink.py')
-rw-r--r-- | emlink.py | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -135,7 +135,14 @@ class AsmModule(): # tables TODO # exports - exports = main.exports.union(self.exports) + def rep_exp(export): + key, value = export.split(':') + if key in replacements: + repped = replacements[key] + return repped + ': ' + repped + return export + my_exports = map(rep_exp, self.exports) + exports = main.exports.union(my_exports) main.exports_js = 'return {' + ','.join(list(exports)) + '};\n})\n' # post |