Address PR feedback, add comment

This commit is contained in:
Yui T 2015-10-08 23:25:05 -07:00
parent 5e921c1d8d
commit 1fc11aa18f

View file

@ -2591,6 +2591,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
}
else {
emit(node.left);
// Add indentation before emit the operator if the operator is on different line
// For example:
// 3
// + 2;
// emitted as
// 3
// + 2;
let indentedBeforeOperator = indentIfOnDifferentLines(node, node.left, node.operatorToken, node.operatorToken.kind !== SyntaxKind.CommaToken ? " " : undefined);
write(tokenToString(node.operatorToken.kind));
let indentedAfterOperator = indentIfOnDifferentLines(node, node.operatorToken, node.right, " ");