Conditionally set originalKeywordKind on Identifiers.

This commit is contained in:
Daniel Rosenwasser
2022-11-12 00:54:03 +00:00
parent 021fd20aac
commit e0667064e4

View File

@@ -949,8 +949,10 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
originalKeywordKind = undefined;
}
const node = baseFactory.createBaseIdentifierNode(SyntaxKind.Identifier) as Mutable<Identifier>;
node.originalKeywordKind = originalKeywordKind;
node.escapedText = escapeLeadingUnderscores(text);
if (originalKeywordKind !== undefined) {
node.originalKeywordKind = originalKeywordKind;
}
return node;
}