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

Function parseNameOfClassDeclarationOrExpression

test/fixtures/snapshot/typescript.js:36883–36892  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36881 return withJSDoc(finishNode(node, pos), hasJSDoc);
36882 }
36883 function parseNameOfClassDeclarationOrExpression() {
36884 // implements is a future reserved word so
36885 // 'class implements' might mean either
36886 // - class expression with omitted name, 'implements' starts heritage clause
36887 // - class with name 'implements'
36888 // 'isImplementsClause' helps to disambiguate between these two cases
36889 return isBindingIdentifier() && !isImplementsClause()
36890 ? createIdentifier(isBindingIdentifier())
36891 : undefined;
36892 }
36893 function isImplementsClause() {
36894 return token() === 117 /* SyntaxKind.ImplementsKeyword */ && lookAhead(nextTokenIsIdentifierOrKeyword);
36895 }

Callers 1

Calls 3

isBindingIdentifierFunction · 0.85
isImplementsClauseFunction · 0.85
createIdentifierFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…