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

Function parseJsxClosingFragment

test/fixtures/snapshot/typescript.js:35431–35447  ·  view source on GitHub ↗
(inExpressionContext)

Source from the content-addressed store, hash-verified

35429 return finishNode(factory.createJsxClosingElement(tagName), pos);
35430 }
35431 function parseJsxClosingFragment(inExpressionContext) {
35432 var pos = getNodePos();
35433 parseExpected(30 /* SyntaxKind.LessThanSlashToken */);
35434 if (ts.tokenIsIdentifierOrKeyword(token())) {
35435 parseErrorAtRange(parseJsxElementName(), ts.Diagnostics.Expected_corresponding_closing_tag_for_JSX_fragment);
35436 }
35437 if (parseExpected(31 /* SyntaxKind.GreaterThanToken */, /*diagnostic*/ undefined, /*shouldAdvance*/ false)) {
35438 // manually advance the scanner in order to look for jsx text inside jsx
35439 if (inExpressionContext) {
35440 nextToken();
35441 }
35442 else {
35443 scanJsxText();
35444 }
35445 }
35446 return finishNode(factory.createJsxJsxClosingFragment(), pos);
35447 }
35448 function parseTypeAssertion() {
35449 var pos = getNodePos();
35450 parseExpected(29 /* SyntaxKind.LessThanToken */);

Calls 8

getNodePosFunction · 0.85
parseExpectedFunction · 0.85
parseErrorAtRangeFunction · 0.85
parseJsxElementNameFunction · 0.85
nextTokenFunction · 0.85
scanJsxTextFunction · 0.85
finishNodeFunction · 0.85
tokenFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…