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

Function parseArrowFunctionExpression

scripts/libs/esprima.js:3090–3111  ·  view source on GitHub ↗
(options, node)

Source from the content-addressed store, hash-verified

3088 }
3089
3090 function parseArrowFunctionExpression(options, node) {
3091 var previousStrict, body;
3092
3093 if (hasLineTerminator) {
3094 tolerateUnexpectedToken(lookahead);
3095 }
3096 expect('=>');
3097 previousStrict = strict;
3098
3099 body = parseConciseBody();
3100
3101 if (strict && options.firstRestricted) {
3102 throwUnexpectedToken(options.firstRestricted, options.message);
3103 }
3104 if (strict && options.stricted) {
3105 tolerateUnexpectedToken(options.stricted, options.message);
3106 }
3107
3108 strict = previousStrict;
3109
3110 return node.finishArrowFunctionExpression(options.params, options.defaults, body, body.type !== Syntax.BlockStatement);
3111 }
3112
3113 // 11.13 Assignment Operators
3114

Callers 1

Calls 4

tolerateUnexpectedTokenFunction · 0.85
expectFunction · 0.85
parseConciseBodyFunction · 0.85
throwUnexpectedTokenFunction · 0.85

Tested by

no test coverage detected