Skip to content

Commit 5d8d3b8

Browse files
committed
addressed PR feedback
1 parent 646daac commit 5d8d3b8

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/compiler/printer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,6 +1759,7 @@ const _super = (function (geti, seti) {
17591759
nodeIsSynthesized(statements[0]) ||
17601760
rangeStartPositionsAreOnSameLine(parentNode, statements[0], currentSourceFile)
17611761
);
1762+
17621763
if (emitAsSingleStatement) {
17631764
write(" ");
17641765
emit(statements[0]);

src/compiler/transformers/es6.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ namespace ts {
111111
thisName?: Identifier;
112112

113113
/*
114-
* set to true if node contains lexical 'this' so we can mark function that wraps convered loop body as 'CapturedThis' for subsequence substitution.
114+
* set to true if node contains lexical 'this' so we can mark function that wraps convered loop body as 'CapturedThis' for subsequent substitution.
115115
*/
116116
containsLexicalThis?: boolean;
117117

@@ -445,7 +445,7 @@ namespace ts {
445445
Debug.assert(convertedLoopState !== undefined);
446446

447447
if (useCapturedThis) {
448-
// if useCapturedThis is true then 'this' keyword is contained inside the arrow function.
448+
// if useCapturedThis is true then 'this' keyword is contained inside an arrow function.
449449
convertedLoopState.containsLexicalThis = true;
450450
return node;
451451
}
@@ -467,10 +467,10 @@ namespace ts {
467467

468468
function visitBreakOrContinueStatement(node: BreakOrContinueStatement): Statement {
469469
if (convertedLoopState) {
470-
// check if we can emit break\continue as is
470+
// check if we can emit break/continue as is
471471
// it is possible if either
472-
// - break\continue is labeled and label is located inside the converted loop
473-
// - break\continue is non-labeled and located in non-converted loop\switch statement
472+
// - break/continue is labeled and label is located inside the converted loop
473+
// - break/continue is non-labeled and located in non-converted loop/switch statement
474474
const jump = node.kind === SyntaxKind.BreakStatement ? Jump.Break : Jump.Continue;
475475
const canUseBreakOrContinue =
476476
(node.label && convertedLoopState.labels && convertedLoopState.labels[node.label.text]) ||

0 commit comments

Comments
 (0)