@@ -566,7 +566,7 @@ namespace ts.formatting {
566
566
if ( tokenInfo . token . end > node . end ) {
567
567
break ;
568
568
}
569
- consumeTokenAndAdvanceScanner ( tokenInfo , node , nodeDynamicIndentation ) ;
569
+ consumeTokenAndAdvanceScanner ( tokenInfo , node , nodeDynamicIndentation , node ) ;
570
570
}
571
571
572
572
function processChildNode (
@@ -617,7 +617,7 @@ namespace ts.formatting {
617
617
break ;
618
618
}
619
619
620
- consumeTokenAndAdvanceScanner ( tokenInfo , node , parentDynamicIndentation ) ;
620
+ consumeTokenAndAdvanceScanner ( tokenInfo , node , parentDynamicIndentation , node ) ;
621
621
}
622
622
623
623
if ( ! formattingScanner . isOnToken ( ) ) {
@@ -673,11 +673,11 @@ namespace ts.formatting {
673
673
computeIndentation ( tokenInfo . token , startLine , Constants . Unknown , parent , parentDynamicIndentation , parentStartLine ) ;
674
674
675
675
listDynamicIndentation = getDynamicIndentation ( parent , parentStartLine , indentation . indentation , indentation . delta ) ;
676
- consumeTokenAndAdvanceScanner ( tokenInfo , parent , listDynamicIndentation ) ;
676
+ consumeTokenAndAdvanceScanner ( tokenInfo , parent , listDynamicIndentation , parent ) ;
677
677
}
678
678
else {
679
679
// consume any tokens that precede the list as child elements of 'node' using its indentation scope
680
- consumeTokenAndAdvanceScanner ( tokenInfo , parent , parentDynamicIndentation ) ;
680
+ consumeTokenAndAdvanceScanner ( tokenInfo , parent , parentDynamicIndentation , parent ) ;
681
681
}
682
682
}
683
683
}
@@ -697,13 +697,13 @@ namespace ts.formatting {
697
697
// without this check close paren will be interpreted as list end token for function expression which is wrong
698
698
if ( tokenInfo . token . kind === listEndToken && rangeContainsRange ( parent , tokenInfo . token ) ) {
699
699
// consume list end token
700
- consumeTokenAndAdvanceScanner ( tokenInfo , parent , listDynamicIndentation ) ;
700
+ consumeTokenAndAdvanceScanner ( tokenInfo , parent , listDynamicIndentation , parent ) ;
701
701
}
702
702
}
703
703
}
704
704
}
705
705
706
- function consumeTokenAndAdvanceScanner ( currentTokenInfo : TokenInfo , parent : Node , dynamicIndentation : DynamicIndentation , container ? : Node ) : void {
706
+ function consumeTokenAndAdvanceScanner ( currentTokenInfo : TokenInfo , parent : Node , dynamicIndentation : DynamicIndentation , container : Node ) : void {
707
707
Debug . assert ( rangeContainsRange ( parent , currentTokenInfo . token ) ) ;
708
708
709
709
const lastTriviaWasNewLine = formattingScanner . lastTrailingTriviaWasNewLine ( ) ;
0 commit comments