()
| 2339 | // 11.3 Postfix Expressions |
| 2340 | |
| 2341 | function parsePostfixExpression() { |
| 2342 | var expr, token, startToken = lookahead; |
| 2343 | |
| 2344 | expr = parseLeftHandSideExpressionAllowCall(); |
| 2345 | |
| 2346 | if (lookahead.type === Token.Punctuator) { |
| 2347 | if ((match('++') || match('--')) && !peekLineTerminator()) { |
| 2348 | // 11.3.1, 11.3.2 |
| 2349 | if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { |
| 2350 | throwErrorTolerant({}, Messages.StrictLHSPostfix); |
| 2351 | } |
| 2352 | |
| 2353 | if (!isLeftHandSide(expr)) { |
| 2354 | throwErrorTolerant({}, Messages.InvalidLHSInAssignment); |
| 2355 | } |
| 2356 | |
| 2357 | token = lex(); |
| 2358 | expr = delegate.markEnd(delegate.createPostfixExpression(token.value, expr), startToken); |
| 2359 | } |
| 2360 | } |
| 2361 | |
| 2362 | return expr; |
| 2363 | } |
| 2364 | |
| 2365 | // 11.4 Unary Operators |
| 2366 |
no test coverage detected