aboutsummaryrefslogtreecommitdiff
path: root/emlink.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-06-28 14:15:26 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-07-03 15:31:03 -0700
commit0de466d64e4cf3e8466c03731f18012688d5ea78 (patch)
tree826bc539fcf76b5c3f1c393e7864895470a5404f /emlink.py
parent077b37c1f617f2a962b99ec55aca9e465086b3df (diff)
apply replacements to exports
Diffstat (limited to 'emlink.py')
-rw-r--r--emlink.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/emlink.py b/emlink.py
index e2dd996c..66c81342 100644
--- a/emlink.py
+++ b/emlink.py
@@ -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