diff options
author | Mihai Bazon <mihai@bazon.net> | 2012-08-17 16:27:43 +0300 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2012-08-17 16:27:43 +0300 |
commit | 4fb6021b0bd68fff881adfe2781e991f9fd2416f (patch) | |
tree | 8b8776c24a687c690c046e7ca92efc8d8b1e0bfe | |
parent | 13f7b119bb7e2184dcd623e167f507b31e73725a (diff) | |
download | tracifyjs-4fb6021b0bd68fff881adfe2781e991f9fd2416f.tar.gz tracifyjs-4fb6021b0bd68fff881adfe2781e991f9fd2416f.zip |
fix one more glitch
-rw-r--r-- | lib/output.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/output.js b/lib/output.js index 85003290..54707f05 100644 --- a/lib/output.js +++ b/lib/output.js @@ -95,7 +95,7 @@ function OutputStream(options) { might_need_space = false; } if (might_need_semicolon) { - if (";{}".indexOf(ch) < 0 && !/[;]$/.test(OUTPUT)) { + if (";}".indexOf(ch) < 0 && !/[;]$/.test(OUTPUT)) { OUTPUT += ";"; current_col++; current_pos++; @@ -672,6 +672,8 @@ function OutputStream(options) { }); DEFPRINT(AST_UnaryPrefix, function(self, output){ output.print(self.operator); + if (is_alphanumeric_char(self.operator.charAt(0))) + output.space(); self.expression.print(output); }); DEFPRINT(AST_UnaryPostfix, function(self, output){ |