MCPcopy Index your code
hub / github.com/nodejs/node / parseSimpleArrowFunctionExpression

Function parseSimpleArrowFunctionExpression

test/fixtures/snapshot/typescript.js:34492–34507  ·  view source on GitHub ↗
(pos, identifier, asyncModifier)

Source from the content-addressed store, hash-verified

34490 }
34491 }
34492 function parseSimpleArrowFunctionExpression(pos, identifier, asyncModifier) {
34493 ts.Debug.assert(token() === 38 /* SyntaxKind.EqualsGreaterThanToken */, "parseSimpleArrowFunctionExpression should only have been called if we had a =>");
34494 var parameter = factory.createParameterDeclaration(
34495 /*decorators*/ undefined,
34496 /*modifiers*/ undefined,
34497 /*dotDotDotToken*/ undefined, identifier,
34498 /*questionToken*/ undefined,
34499 /*type*/ undefined,
34500 /*initializer*/ undefined);
34501 finishNode(parameter, identifier.pos);
34502 var parameters = createNodeArray([parameter], parameter.pos, parameter.end);
34503 var equalsGreaterThanToken = parseExpectedToken(38 /* SyntaxKind.EqualsGreaterThanToken */);
34504 var body = parseArrowFunctionExpressionBody(/*isAsync*/ !!asyncModifier);
34505 var node = factory.createArrowFunction(asyncModifier, /*typeParameters*/ undefined, parameters, /*type*/ undefined, equalsGreaterThanToken, body);
34506 return addJSDocComment(finishNode(node, pos));
34507 }
34508 function tryParseParenthesizedArrowFunctionExpression() {
34509 var triState = isParenthesizedArrowFunctionExpression();
34510 if (triState === 0 /* Tristate.False */) {

Calls 7

finishNodeFunction · 0.85
createNodeArrayFunction · 0.85
parseExpectedTokenFunction · 0.85
addJSDocCommentFunction · 0.85
assertMethod · 0.80
tokenFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…