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

Method expectJSX

src/jsx-parser.ts:339–344  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

337 // If not, an exception will be thrown.
338
339 expectJSX(value) {
340 const token = this.nextJSXToken();
341 if (token.type !== Token.Punctuator || token.value !== value) {
342 this.throwUnexpectedToken(token);
343 }
344 }
345
346 // Return true if the next JSX token matches the specified punctuator.
347

Callers 9

reenterJSXMethod · 0.95
parseJSXElementNameMethod · 0.95
parseJSXAttributeNameMethod · 0.95

Calls 2

nextJSXTokenMethod · 0.95
throwUnexpectedTokenMethod · 0.45

Tested by

no test coverage detected