MCPcopy Index your code
hub / github.com/nodejs/node / getFirstIdentifier

Function getFirstIdentifier

test/fixtures/snapshot/typescript.js:19099–19114  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

19097 }
19098 ts.isEntityNameExpression = isEntityNameExpression;
19099 function getFirstIdentifier(node) {
19100 switch (node.kind) {
19101 case 79 /* SyntaxKind.Identifier */:
19102 return node;
19103 case 161 /* SyntaxKind.QualifiedName */:
19104 do {
19105 node = node.left;
19106 } while (node.kind !== 79 /* SyntaxKind.Identifier */);
19107 return node;
19108 case 206 /* SyntaxKind.PropertyAccessExpression */:
19109 do {
19110 node = node.expression;
19111 } while (node.kind !== 79 /* SyntaxKind.Identifier */);
19112 return node;
19113 }
19114 }
19115 ts.getFirstIdentifier = getFirstIdentifier;
19116 function isDottedName(node) {
19117 return node.kind === 79 /* SyntaxKind.Identifier */

Callers 1

visitSymbolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected