fix one more glitch
authorMihai Bazon <mihai@bazon.net>
Fri, 17 Aug 2012 13:27:43 +0000 (16:27 +0300)
committerMihai Bazon <mihai@bazon.net>
Fri, 17 Aug 2012 13:27:43 +0000 (16:27 +0300)
lib/output.js

index 8500329..54707f0 100644 (file)
@@ -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){