aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2012-08-17 23:08:09 +0300
committerMihai Bazon <mihai@bazon.net>2012-08-17 23:08:09 +0300
commitcd8ae5f712fa64ac2d6dff0c5028d8bc70d331ed (patch)
tree2f13429f924102de954e993f33bc785c3488bbf9 /lib
parentef87c9fd8fafa006146d45ba2a870237a127c9d4 (diff)
downloadtracifyjs-cd8ae5f712fa64ac2d6dff0c5028d8bc70d331ed.tar.gz
tracifyjs-cd8ae5f712fa64ac2d6dff0c5028d8bc70d331ed.zip
minor whitespace issues
Diffstat (limited to 'lib')
-rw-r--r--lib/output.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/output.js b/lib/output.js
index 12cf104e..05a0447d 100644
--- a/lib/output.js
+++ b/lib/output.js
@@ -713,17 +713,20 @@ function OutputStream(options) {
/* -----[ literals ]----- */
DEFPRINT(AST_Array, function(self, output){
output.with_square(function(){
- self.elements.forEach(function(exp, i){
+ var a = self.elements, len = a.length;
+ if (len > 0) output.space();
+ a.forEach(function(exp, i){
if (i) output.comma();
exp.print(output);
});
+ if (len > 0) output.space();
});
});
DEFPRINT(AST_Object, function(self, output){
if (self.properties.length > 0) output.with_block(function(){
self.properties.forEach(function(prop, i){
if (i) {
- output.comma();
+ output.print(",");
output.newline();
}
output.indent();