MCPcopy Index your code
hub / github.com/BloombergGraphics/whatiscode / parsePostfixExpression

Function parsePostfixExpression

scripts/libs/esprima.js:2798–2820  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2796 // 11.3 Postfix Expressions
2797
2798 function parsePostfixExpression() {
2799 var expr, token, startToken = lookahead;
2800
2801 expr = parseLeftHandSideExpressionAllowCall();
2802
2803 if (!hasLineTerminator && lookahead.type === Token.Punctuator) {
2804 if (match('++') || match('--')) {
2805 // 11.3.1, 11.3.2
2806 if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) {
2807 tolerateError(Messages.StrictLHSPostfix);
2808 }
2809
2810 if (!isLeftHandSide(expr)) {
2811 tolerateError(Messages.InvalidLHSInAssignment);
2812 }
2813
2814 token = lex();
2815 expr = new WrappingNode(startToken).finishPostfixExpression(token.value, expr);
2816 }
2817 }
2818
2819 return expr;
2820 }
2821
2822 // 11.4 Unary Operators
2823

Callers 1

parseUnaryExpressionFunction · 0.85

Calls 6

matchFunction · 0.85
isRestrictedWordFunction · 0.85
tolerateErrorFunction · 0.85
isLeftHandSideFunction · 0.85
lexFunction · 0.85

Tested by

no test coverage detected