MCPcopy Index your code
hub / github.com/jquery/esprima / parseJSXStringLiteralAttribute

Method parseJSXStringLiteralAttribute

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

Source from the content-addressed store, hash-verified

398 }
399
400 parseJSXStringLiteralAttribute(): Node.Literal {
401 const node = this.createJSXNode();
402 const token = this.nextJSXToken();
403 if (token.type !== Token.StringLiteral) {
404 this.throwUnexpectedToken(token);
405 }
406 const raw = this.getTokenRaw(token);
407 return this.finalize(node, new Node.Literal(token.value, raw));
408 }
409
410 parseJSXExpressionAttribute(): JSXNode.JSXExpressionContainer {
411 const node = this.createJSXNode();

Callers 1

Calls 5

createJSXNodeMethod · 0.95
nextJSXTokenMethod · 0.95
getTokenRawMethod · 0.80
finalizeMethod · 0.80
throwUnexpectedTokenMethod · 0.45

Tested by

no test coverage detected