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

Method parseJSXExpressionAttribute

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

Source from the content-addressed store, hash-verified

408 }
409
410 parseJSXExpressionAttribute(): JSXNode.JSXExpressionContainer {
411 const node = this.createJSXNode();
412
413 this.expectJSX('{');
414 this.finishJSX();
415
416 if (this.match('}')) {
417 this.tolerateError('JSX attributes must only be assigned a non-empty expression');
418 }
419
420 const expression = this.parseAssignmentExpression();
421 this.reenterJSX();
422
423 return this.finalize(node, new JSXNode.JSXExpressionContainer(expression));
424 }
425
426 parseJSXAttributeValue(): JSXNode.JSXAttributeValue {
427 return this.matchJSX('{') ? this.parseJSXExpressionAttribute() :

Callers 1

Calls 8

createJSXNodeMethod · 0.95
expectJSXMethod · 0.95
finishJSXMethod · 0.95
reenterJSXMethod · 0.95
matchMethod · 0.80
finalizeMethod · 0.80
tolerateErrorMethod · 0.45

Tested by

no test coverage detected