MCPcopy Index your code
hub / github.com/reactjs/react-rails / scanJSXStringLiteral

Function scanJSXStringLiteral

lib/assets/javascripts/JSXTransformer.js:9179–9200  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9177 }
9178
9179 function scanJSXStringLiteral() {
9180 var innerToken, quote, start;
9181
9182 quote = source[index];
9183 assert((quote === '\'' || quote === '"'),
9184 'String literal must starts with a quote');
9185
9186 start = index;
9187 ++index;
9188
9189 innerToken = scanJSXText([quote]);
9190
9191 if (quote !== source[index]) {
9192 throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
9193 }
9194
9195 ++index;
9196
9197 innerToken.range = [start, index];
9198
9199 return innerToken;
9200 }
9201
9202 /**
9203 * Between JSX opening and closing tags (e.g. <foo>HERE</foo>), anything that

Callers 1

advanceFunction · 0.85

Calls 3

assertFunction · 0.85
scanJSXTextFunction · 0.85
throwErrorFunction · 0.85

Tested by

no test coverage detected