Skip to content

Commit 9ffc7a9

Browse files
committed
Merge pull request microsoft#8669 from ethanrubio/patch-1
Fix minor comment grammatical errors
2 parents 59f269c + b8692a7 commit 9ffc7a9

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/services/breakpoints.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ namespace ts.BreakpointResolver {
2424
// token on same line if trailing trivia (comments or white spaces on same line) part of the last token on that line
2525
tokenAtLocation = findPrecedingToken(tokenAtLocation.pos, sourceFile);
2626

27-
// Its a blank line
27+
// It's a blank line
2828
if (!tokenAtLocation || sourceFile.getLineAndCharacterOfPosition(tokenAtLocation.getEnd()).line !== lineOfPosition) {
2929
return undefined;
3030
}
@@ -312,7 +312,7 @@ namespace ts.BreakpointResolver {
312312

313313
case SyntaxKind.BinaryExpression:
314314
if ((<BinaryExpression>node.parent).operatorToken.kind === SyntaxKind.CommaToken) {
315-
// if this is comma expression, the breakpoint is possible in this expression
315+
// If this is a comma expression, the breakpoint is possible in this expression
316316
return textSpan(node);
317317
}
318318
break;
@@ -387,7 +387,7 @@ namespace ts.BreakpointResolver {
387387
return spanInNode(variableDeclaration.parent.parent);
388388
}
389389

390-
// If this is a destructuring pattern set breakpoint in binding pattern
390+
// If this is a destructuring pattern, set breakpoint in binding pattern
391391
if (isBindingPattern(variableDeclaration.name)) {
392392
return spanInBindingPattern(<BindingPattern>variableDeclaration.name);
393393
}
@@ -402,9 +402,9 @@ namespace ts.BreakpointResolver {
402402

403403
let declarations = variableDeclaration.parent.declarations;
404404
if (declarations && declarations[0] !== variableDeclaration) {
405-
// If we cant set breakpoint on this declaration, set it on previous one
405+
// If we cannot set breakpoint on this declaration, set it on previous one
406406
// Because the variable declaration may be binding pattern and
407-
// we would like to set breakpoint in last binding element if thats the case,
407+
// we would like to set breakpoint in last binding element if that's the case,
408408
// use preceding token instead
409409
return spanInNode(findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent));
410410
}
@@ -418,7 +418,7 @@ namespace ts.BreakpointResolver {
418418

419419
function spanInParameterDeclaration(parameter: ParameterDeclaration): TextSpan {
420420
if (isBindingPattern(parameter.name)) {
421-
// set breakpoint in binding pattern
421+
// Set breakpoint in binding pattern
422422
return spanInBindingPattern(<BindingPattern>parameter.name);
423423
}
424424
else if (canHaveSpanInParameterDeclaration(parameter)) {
@@ -492,7 +492,7 @@ namespace ts.BreakpointResolver {
492492

493493
function spanInInitializerOfForLike(forLikeStatement: ForStatement | ForOfStatement | ForInStatement): TextSpan {
494494
if (forLikeStatement.initializer.kind === SyntaxKind.VariableDeclarationList) {
495-
// declaration list, set breakpoint in first declaration
495+
// Declaration list - set breakpoint in first declaration
496496
let variableDeclarationList = <VariableDeclarationList>forLikeStatement.initializer;
497497
if (variableDeclarationList.declarations.length > 0) {
498498
return spanInNode(variableDeclarationList.declarations[0]);
@@ -578,7 +578,7 @@ namespace ts.BreakpointResolver {
578578
function spanInCloseBraceToken(node: Node): TextSpan {
579579
switch (node.parent.kind) {
580580
case SyntaxKind.ModuleBlock:
581-
// If this is not instantiated module block no bp span
581+
// If this is not an instantiated module block, no bp span
582582
if (getModuleInstanceState(node.parent.parent) !== ModuleInstanceState.Instantiated) {
583583
return undefined;
584584
}
@@ -593,7 +593,7 @@ namespace ts.BreakpointResolver {
593593
// Span on close brace token
594594
return textSpan(node);
595595
}
596-
// fall through.
596+
// fall through
597597

598598
case SyntaxKind.CatchClause:
599599
return spanInNode(lastOrUndefined((<Block>node.parent).statements));
@@ -714,7 +714,7 @@ namespace ts.BreakpointResolver {
714714

715715
function spanInOfKeyword(node: Node): TextSpan {
716716
if (node.parent.kind === SyntaxKind.ForOfStatement) {
717-
// set using next token
717+
// Set using next token
718718
return spanInNextNode(node);
719719
}
720720

@@ -723,4 +723,4 @@ namespace ts.BreakpointResolver {
723723
}
724724
}
725725
}
726-
}
726+
}

0 commit comments

Comments
 (0)