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