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

Function parsePostfixExpression

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

Source from the content-addressed store, hash-verified

5998 // 11.3 Postfix Expressions
5999
6000 function parsePostfixExpression() {
6001 var marker = markerCreate(),
6002 expr = parseLeftHandSideExpressionAllowCall(),
6003 token;
6004
6005 if (lookahead.type !== Token.Punctuator) {
6006 return expr;
6007 }
6008
6009 if ((match('++') || match('--')) && !peekLineTerminator()) {
6010 // 11.3.1, 11.3.2
6011 if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) {
6012 throwErrorTolerant({}, Messages.StrictLHSPostfix);
6013 }
6014
6015 if (!isLeftHandSide(expr)) {
6016 throwError({}, Messages.InvalidLHSInAssignment);
6017 }
6018
6019 token = lex();
6020 expr = markerApply(marker, delegate.createPostfixExpression(token.value, expr));
6021 }
6022
6023 return expr;
6024 }
6025
6026 // 11.4 Unary Operators
6027

Callers 1

parseUnaryExpressionFunction · 0.85

Calls 10

markerCreateFunction · 0.85
matchFunction · 0.85
peekLineTerminatorFunction · 0.85
isRestrictedWordFunction · 0.85
throwErrorTolerantFunction · 0.85
isLeftHandSideFunction · 0.85
throwErrorFunction · 0.85
lexFunction · 0.85
markerApplyFunction · 0.85

Tested by

no test coverage detected