MCPcopy
hub / github.com/jquery/esprima / parseJSXOpeningElement

Method parseJSXOpeningElement

src/jsx-parser.ts:466–479  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

464 }
465
466 parseJSXOpeningElement(): JSXNode.JSXOpeningElement {
467 const node = this.createJSXNode();
468
469 this.expectJSX('<');
470 const name = this.parseJSXElementName();
471 const attributes = this.parseJSXAttributes();
472 const selfClosing = this.matchJSX('/');
473 if (selfClosing) {
474 this.expectJSX('/');
475 }
476 this.expectJSX('>');
477
478 return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes));
479 }
480
481 parseJSXBoundaryElement(): JSXNode.JSXOpeningElement | JSXNode.JSXClosingElement {
482 const node = this.createJSXNode();

Callers 1

parseJSXElementMethod · 0.95

Calls 6

createJSXNodeMethod · 0.95
expectJSXMethod · 0.95
parseJSXElementNameMethod · 0.95
parseJSXAttributesMethod · 0.95
matchJSXMethod · 0.95
finalizeMethod · 0.80

Tested by

no test coverage detected