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

Function parseJsxClosingElement

test/fixtures/snapshot/typescript.js:35416–35430  ·  view source on GitHub ↗
(open, inExpressionContext)

Source from the content-addressed store, hash-verified

35414 return finishNode(factory.createJsxSpreadAttribute(expression), pos);
35415 }
35416 function parseJsxClosingElement(open, inExpressionContext) {
35417 var pos = getNodePos();
35418 parseExpected(30 /* SyntaxKind.LessThanSlashToken */);
35419 var tagName = parseJsxElementName();
35420 if (parseExpected(31 /* SyntaxKind.GreaterThanToken */, /*diagnostic*/ undefined, /*shouldAdvance*/ false)) {
35421 // manually advance the scanner in order to look for jsx text inside jsx
35422 if (inExpressionContext || !tagNamesAreEquivalent(open.tagName, tagName)) {
35423 nextToken();
35424 }
35425 else {
35426 scanJsxText();
35427 }
35428 }
35429 return finishNode(factory.createJsxClosingElement(tagName), pos);
35430 }
35431 function parseJsxClosingFragment(inExpressionContext) {
35432 var pos = getNodePos();
35433 parseExpected(30 /* SyntaxKind.LessThanSlashToken */);

Calls 7

getNodePosFunction · 0.85
parseExpectedFunction · 0.85
parseJsxElementNameFunction · 0.85
tagNamesAreEquivalentFunction · 0.85
nextTokenFunction · 0.85
scanJsxTextFunction · 0.85
finishNodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…