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

Function parseElementAccessExpressionRest

test/fixtures/snapshot/typescript.js:35498–35515  ·  view source on GitHub ↗
(pos, expression, questionDotToken)

Source from the content-addressed store, hash-verified

35496 return finishNode(propertyAccess, pos);
35497 }
35498 function parseElementAccessExpressionRest(pos, expression, questionDotToken) {
35499 var argumentExpression;
35500 if (token() === 23 /* SyntaxKind.CloseBracketToken */) {
35501 argumentExpression = createMissingNode(79 /* SyntaxKind.Identifier */, /*reportAtCurrentPosition*/ true, ts.Diagnostics.An_element_access_expression_should_take_an_argument);
35502 }
35503 else {
35504 var argument = allowInAnd(parseExpression);
35505 if (ts.isStringOrNumericLiteralLike(argument)) {
35506 argument.text = internIdentifier(argument.text);
35507 }
35508 argumentExpression = argument;
35509 }
35510 parseExpected(23 /* SyntaxKind.CloseBracketToken */);
35511 var indexedAccess = questionDotToken || tryReparseOptionalChain(expression) ?
35512 factory.createElementAccessChain(expression, questionDotToken, argumentExpression) :
35513 factory.createElementAccessExpression(expression, argumentExpression);
35514 return finishNode(indexedAccess, pos);
35515 }
35516 function parseMemberExpressionRest(pos, expression, allowOptionalChain) {
35517 while (true) {
35518 var questionDotToken = void 0;

Callers 1

Calls 7

createMissingNodeFunction · 0.85
allowInAndFunction · 0.85
internIdentifierFunction · 0.85
parseExpectedFunction · 0.85
tryReparseOptionalChainFunction · 0.85
finishNodeFunction · 0.85
tokenFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…