@@ -24,7 +24,7 @@ namespace ts.BreakpointResolver {
24
24
// token on same line if trailing trivia (comments or white spaces on same line) part of the last token on that line
25
25
tokenAtLocation = findPrecedingToken ( tokenAtLocation . pos , sourceFile ) ;
26
26
27
- // Its a blank line
27
+ // It's a blank line
28
28
if ( ! tokenAtLocation || sourceFile . getLineAndCharacterOfPosition ( tokenAtLocation . getEnd ( ) ) . line !== lineOfPosition ) {
29
29
return undefined ;
30
30
}
@@ -312,7 +312,7 @@ namespace ts.BreakpointResolver {
312
312
313
313
case SyntaxKind . BinaryExpression :
314
314
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
316
316
return textSpan ( node ) ;
317
317
}
318
318
break ;
@@ -387,7 +387,7 @@ namespace ts.BreakpointResolver {
387
387
return spanInNode ( variableDeclaration . parent . parent ) ;
388
388
}
389
389
390
- // If this is a destructuring pattern set breakpoint in binding pattern
390
+ // If this is a destructuring pattern, set breakpoint in binding pattern
391
391
if ( isBindingPattern ( variableDeclaration . name ) ) {
392
392
return spanInBindingPattern ( < BindingPattern > variableDeclaration . name ) ;
393
393
}
@@ -402,9 +402,9 @@ namespace ts.BreakpointResolver {
402
402
403
403
let declarations = variableDeclaration . parent . declarations ;
404
404
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
406
406
// 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,
408
408
// use preceding token instead
409
409
return spanInNode ( findPrecedingToken ( variableDeclaration . pos , sourceFile , variableDeclaration . parent ) ) ;
410
410
}
@@ -418,7 +418,7 @@ namespace ts.BreakpointResolver {
418
418
419
419
function spanInParameterDeclaration ( parameter : ParameterDeclaration ) : TextSpan {
420
420
if ( isBindingPattern ( parameter . name ) ) {
421
- // set breakpoint in binding pattern
421
+ // Set breakpoint in binding pattern
422
422
return spanInBindingPattern ( < BindingPattern > parameter . name ) ;
423
423
}
424
424
else if ( canHaveSpanInParameterDeclaration ( parameter ) ) {
@@ -492,7 +492,7 @@ namespace ts.BreakpointResolver {
492
492
493
493
function spanInInitializerOfForLike ( forLikeStatement : ForStatement | ForOfStatement | ForInStatement ) : TextSpan {
494
494
if ( forLikeStatement . initializer . kind === SyntaxKind . VariableDeclarationList ) {
495
- // declaration list, set breakpoint in first declaration
495
+ // Declaration list - set breakpoint in first declaration
496
496
let variableDeclarationList = < VariableDeclarationList > forLikeStatement . initializer ;
497
497
if ( variableDeclarationList . declarations . length > 0 ) {
498
498
return spanInNode ( variableDeclarationList . declarations [ 0 ] ) ;
@@ -578,7 +578,7 @@ namespace ts.BreakpointResolver {
578
578
function spanInCloseBraceToken ( node : Node ) : TextSpan {
579
579
switch ( node . parent . kind ) {
580
580
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
582
582
if ( getModuleInstanceState ( node . parent . parent ) !== ModuleInstanceState . Instantiated ) {
583
583
return undefined ;
584
584
}
@@ -593,7 +593,7 @@ namespace ts.BreakpointResolver {
593
593
// Span on close brace token
594
594
return textSpan ( node ) ;
595
595
}
596
- // fall through.
596
+ // fall through
597
597
598
598
case SyntaxKind . CatchClause :
599
599
return spanInNode ( lastOrUndefined ( ( < Block > node . parent ) . statements ) ) ;
@@ -714,7 +714,7 @@ namespace ts.BreakpointResolver {
714
714
715
715
function spanInOfKeyword ( node : Node ) : TextSpan {
716
716
if ( node . parent . kind === SyntaxKind . ForOfStatement ) {
717
- // set using next token
717
+ // Set using next token
718
718
return spanInNextNode ( node ) ;
719
719
}
720
720
@@ -723,4 +723,4 @@ namespace ts.BreakpointResolver {
723
723
}
724
724
}
725
725
}
726
- }
726
+ }
0 commit comments