Skip to content

Commit 1fc11aa

Browse files
author
Yui T
committed
Address PR feedback, add comment
1 parent 5e921c1 commit 1fc11aa

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/compiler/emitter.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2591,6 +2591,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
25912591
}
25922592
else {
25932593
emit(node.left);
2594+
// Add indentation before emit the operator if the operator is on different line
2595+
// For example:
2596+
// 3
2597+
// + 2;
2598+
// emitted as
2599+
// 3
2600+
// + 2;
25942601
let indentedBeforeOperator = indentIfOnDifferentLines(node, node.left, node.operatorToken, node.operatorToken.kind !== SyntaxKind.CommaToken ? " " : undefined);
25952602
write(tokenToString(node.operatorToken.kind));
25962603
let indentedAfterOperator = indentIfOnDifferentLines(node, node.operatorToken, node.right, " ");

0 commit comments

Comments
 (0)