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

Function parseJsxElementName

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

Source from the content-addressed store, hash-verified

35357 return finishNode(node, pos);
35358 }
35359 function parseJsxElementName() {
35360 var pos = getNodePos();
35361 scanJsxIdentifier();
35362 // JsxElement can have name in the form of
35363 // propertyAccessExpression
35364 // primaryExpression in the form of an identifier and "this" keyword
35365 // We can't just simply use parseLeftHandSideExpressionOrHigher because then we will start consider class,function etc as a keyword
35366 // We only want to consider "this" as a primaryExpression
35367 var expression = token() === 108 /* SyntaxKind.ThisKeyword */ ?
35368 parseTokenNode() : parseIdentifierName();
35369 while (parseOptional(24 /* SyntaxKind.DotToken */)) {
35370 expression = finishNode(factory.createPropertyAccessExpression(expression, parseRightSideOfDot(/*allowIdentifierNames*/ true, /*allowPrivateIdentifiers*/ false)), pos);
35371 }
35372 return expression;
35373 }
35374 function parseJsxExpression(inExpressionContext) {
35375 var pos = getNodePos();
35376 if (!parseExpected(18 /* SyntaxKind.OpenBraceToken */)) {

Calls 8

getNodePosFunction · 0.85
scanJsxIdentifierFunction · 0.85
parseTokenNodeFunction · 0.85
parseIdentifierNameFunction · 0.85
parseOptionalFunction · 0.85
finishNodeFunction · 0.85
parseRightSideOfDotFunction · 0.85
tokenFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…