aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralon@honor <none@none>2010-10-31 16:22:15 -0700
committeralon@honor <none@none>2010-10-31 16:22:15 -0700
commit34557661977141046f2ab934a50d492535cf1766 (patch)
treebf77171de2100f7bac60a68eaeac21e67c399345
parentdb2dfd4026c5aaba0a4b1fc2778b1ca36bec8a62 (diff)
finish module-ization of generated code
-rw-r--r--src/postamble.js7
-rw-r--r--src/shell.js5
2 files changed, 3 insertions, 9 deletions
diff --git a/src/postamble.js b/src/postamble.js
index 448ee0fb..fb552606 100644
--- a/src/postamble.js
+++ b/src/postamble.js
@@ -48,10 +48,5 @@ function run(args) {
}
}
-try {
- run(this.args ? this.args : (this.arguments ? this.arguments : []));
-} catch (e) {
- print("Fatal exception: " + e);
- throw e;
-}
+run(args);
diff --git a/src/shell.js b/src/shell.js
index 7c365d6d..3461681e 100644
--- a/src/shell.js
+++ b/src/shell.js
@@ -1,12 +1,11 @@
-var that = this;
// Capture the output of this into a variable, if you want
(function(Module, args) {
Module = Module || {};
- arguments = arguments || [];
+ args = args || [];
{{BODY}}
return Module;
-}).apply(this, this.arguments); // Replace parameters as needed
+})({}, this.arguments); // Replace parameters as needed