aboutsummaryrefslogtreecommitdiff
path: root/lib/output.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/output.js')
-rw-r--r--lib/output.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/output.js b/lib/output.js
index 4b515ecd..ab44222f 100644
--- a/lib/output.js
+++ b/lib/output.js
@@ -137,7 +137,7 @@ function OutputStream(options) {
str = String(str);
var ch = str.charAt(0);
if (might_need_semicolon) {
- if (";}".indexOf(ch) < 0 && !/[;]$/.test(last)) {
+ if ((!ch || ";}".indexOf(ch) < 0) && !/[;]$/.test(last)) {
if (options.semicolons || requireSemicolonChars(ch)) {
OUTPUT += ";";
current_col++;
@@ -529,6 +529,7 @@ function OutputStream(options) {
});
DEFPRINT(AST_Toplevel, function(self, output){
display_body(self.body, true, output);
+ output.print("");
});
DEFPRINT(AST_LabeledStatement, function(self, output){
self.label.print(output);