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

Function parseConditionalExpression

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

Source from the content-addressed store, hash-verified

6215 // 11.12 Conditional Operator
6216
6217 function parseConditionalExpression() {
6218 var expr, previousAllowIn, consequent, alternate, marker = markerCreate();
6219 expr = parseBinaryExpression();
6220
6221 if (match('?')) {
6222 lex();
6223 previousAllowIn = state.allowIn;
6224 state.allowIn = true;
6225 consequent = parseAssignmentExpression();
6226 state.allowIn = previousAllowIn;
6227 expect(':');
6228 alternate = parseAssignmentExpression();
6229
6230 expr = markerApply(marker, delegate.createConditionalExpression(expr, consequent, alternate));
6231 }
6232
6233 return expr;
6234 }
6235
6236 // 11.13 Assignment Operators
6237

Callers 1

Calls 7

markerCreateFunction · 0.85
parseBinaryExpressionFunction · 0.85
matchFunction · 0.85
lexFunction · 0.85
expectFunction · 0.85
markerApplyFunction · 0.85

Tested by

no test coverage detected