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

Function parseExpression

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

Source from the content-addressed store, hash-verified

6523 // 11.14 Comma Operator
6524
6525 function parseExpression() {
6526 var marker, expr, expressions, sequence, spreadFound;
6527
6528 marker = markerCreate();
6529 expr = parseAssignmentExpression();
6530 expressions = [ expr ];
6531
6532 if (match(',')) {
6533 while (index < length) {
6534 if (!match(',')) {
6535 break;
6536 }
6537
6538 lex();
6539 expr = parseSpreadOrAssignmentExpression();
6540 expressions.push(expr);
6541
6542 if (expr.type === Syntax.SpreadElement) {
6543 spreadFound = true;
6544 if (!match(')')) {
6545 throwError({}, Messages.ElementAfterSpreadElement);
6546 }
6547 break;
6548 }
6549 }
6550
6551 sequence = markerApply(marker, delegate.createSequenceExpression(expressions));
6552 }
6553
6554 if (spreadFound && lookahead2().value !== '=>') {
6555 throwError({}, Messages.IllegalSpread);
6556 }
6557
6558 return sequence || expr;
6559 }
6560
6561 // 12.1 Block
6562

Callers 15

parseArrayInitialiserFunction · 0.85
parseTemplateLiteralFunction · 0.85
parseGroupExpressionFunction · 0.85
parseComputedMemberFunction · 0.85
parseExpressionStatementFunction · 0.85
parseIfStatementFunction · 0.85
parseDoWhileStatementFunction · 0.85
parseWhileStatementFunction · 0.85
parseForStatementFunction · 0.85
parseReturnStatementFunction · 0.85
parseWithStatementFunction · 0.85
parseSwitchCaseFunction · 0.85

Calls 8

markerCreateFunction · 0.85
matchFunction · 0.85
lexFunction · 0.85
throwErrorFunction · 0.85
markerApplyFunction · 0.85
lookahead2Function · 0.85

Tested by

no test coverage detected