MCPcopy Create free account
hub / github.com/dchester/jsonpath / parseLeftHandSideExpressionAllowCall

Function parseLeftHandSideExpressionAllowCall

jsonpath.js:2291–2316  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2289 }
2290
2291 function parseLeftHandSideExpressionAllowCall() {
2292 var expr, args, property, startToken, previousAllowIn = state.allowIn;
2293
2294 startToken = lookahead;
2295 state.allowIn = true;
2296 expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression();
2297
2298 for (;;) {
2299 if (match('.')) {
2300 property = parseNonComputedMember();
2301 expr = delegate.createMemberExpression('.', expr, property);
2302 } else if (match('(')) {
2303 args = parseArguments();
2304 expr = delegate.createCallExpression(expr, args);
2305 } else if (match('[')) {
2306 property = parseComputedMember();
2307 expr = delegate.createMemberExpression('[', expr, property);
2308 } else {
2309 break;
2310 }
2311 delegate.markEnd(expr, startToken);
2312 }
2313 state.allowIn = previousAllowIn;
2314
2315 return expr;
2316 }
2317
2318 function parseLeftHandSideExpression() {
2319 var expr, property, startToken;

Callers 1

parsePostfixExpressionFunction · 0.85

Calls 7

matchKeywordFunction · 0.85
parseNewExpressionFunction · 0.85
parsePrimaryExpressionFunction · 0.85
matchFunction · 0.85
parseNonComputedMemberFunction · 0.85
parseArgumentsFunction · 0.85
parseComputedMemberFunction · 0.85

Tested by

no test coverage detected