We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 907664c commit 422b541Copy full SHA for 422b541
src/services/services.ts
@@ -172,10 +172,11 @@ namespace ts {
172
const token = scanner.scan();
173
const textPos = scanner.getTextPos();
174
if (textPos <= end) {
175
- if (token === SyntaxKind.Identifier) {
176
- Debug.fail(`Did not expect ${Debug.showSyntaxKind(parent)} to have an Identifier in its trivia`);
+ const node = createNode(token, pos, textPos, parent);
+ nodes.push(node);
177
+ if (isIdentifier(node)) {
178
+ node.escapedText = escapeLeadingUnderscores(scanner.getTokenValue());
179
}
- nodes.push(createNode(token, pos, textPos, parent));
180
181
pos = textPos;
182
if (token === SyntaxKind.EndOfFileToken) {
0 commit comments