Skip to content

Commit

Permalink
Fix whitespace in the __js_main__
Browse files Browse the repository at this point in the history
  • Loading branch information
Whiteknight committed Apr 1, 2012
1 parent c9f1feb commit de51ea7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stage0/js/wast.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,10 @@ def(wast, "MainFunctionDecl", {
var wx = "function __js_main__[anon](var arguments)\n" +
"{\n" +
FUNC_ENTRY;
//emitter.increase_indent();
emitter.increase_indent();
var stmts = this.children.map(function(c) { return emitter.emit(c.toWinxed(st)) + ";\n"; }).join("");


var fwd_fetch = "";
for (var g in st_globals) {
//sys.puts("Saw global " + g + " locally");
Expand All @@ -177,12 +178,11 @@ def(wast, "MainFunctionDecl", {
if (fwd_fetch != "")
fwd_fetch = emitter.emit("/* Declare and fetch global values */\n") + fwd_fetch + "\n";
wx += fwd_fetch;

wx += emitter.emit("/* Begin user code */\n") +
stmts + "\n" +
emitter.emit("/* End user code */\n") +
"}";
//emitter.decrease_indent();
emitter.decrease_indent();
return wx;
}
});
Expand Down

0 comments on commit de51ea7

Please sign in to comment.