Fix newlines before the update suffix operator in babel-generator (#6259)

This commit is contained in:
Ethan Han
2017-09-18 03:22:05 +09:00
committed by Logan Smyth
parent c815cf554f
commit f5ad86c5c6
3 changed files with 5 additions and 1 deletions

View File

@@ -33,7 +33,9 @@ export function UpdateExpression(node: Object) {
this.token(node.operator);
this.print(node.argument, node);
} else {
this.startTerminatorless(true);
this.print(node.argument, node);
this.endTerminatorless();
this.token(node.operator);
}
}

View File

@@ -1,3 +1,4 @@
++i;
i++;
(foo++).test();
obj.foo/*comment*/++;

View File

@@ -1,3 +1,4 @@
++i;
i++;
(foo++).test();
(foo++).test();
obj.foo /*comment*/++;