@@ -54,7 +54,7 @@ import {
5454 TextRange , TextSpan , textSpanEnd , timestamp , TodoComment , TodoCommentDescriptor , Token , toPath , tracing ,
5555 TransformFlags , TransientSymbol , Type , TypeChecker , TypeFlags , TypeNode , TypeParameter , TypePredicate ,
5656 TypeReference , typeToDisplayParts , UnderscoreEscapedMap , UnionOrIntersectionType , UnionType , updateSourceFile ,
57- UserPreferences , VariableDeclaration ,
57+ UserPreferences , VariableDeclaration , hasTabstop ,
5858} from "./_namespaces/ts" ;
5959
6060/** The version of the language service API */
@@ -234,6 +234,9 @@ function addSyntheticNodes(nodes: Push<Node>, pos: number, end: number, parent:
234234 const textPos = scanner . getTextPos ( ) ;
235235 if ( textPos <= end ) {
236236 if ( token === SyntaxKind . Identifier ) {
237+ if ( hasTabstop ( parent ) ) {
238+ continue ;
239+ }
237240 Debug . fail ( `Did not expect ${ Debug . formatSyntaxKind ( parent . kind ) } to have an Identifier in its trivia` ) ;
238241 }
239242 nodes . push ( createNode ( token , pos , textPos , parent ) ) ;
0 commit comments