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

Function walkAccessExpression

test/fixtures/snapshot/typescript.js:19817–19845  ·  view source on GitHub ↗
(access)

Source from the content-addressed store, hash-verified

19815 return walkAccessExpression(name.parent);
19816 }
19817 function walkAccessExpression(access) {
19818 if (access.kind === 206 /* SyntaxKind.PropertyAccessExpression */) {
19819 var res = action(access.name);
19820 if (res !== undefined) {
19821 return res;
19822 }
19823 }
19824 else if (access.kind === 207 /* SyntaxKind.ElementAccessExpression */) {
19825 if (ts.isIdentifier(access.argumentExpression) || ts.isStringLiteralLike(access.argumentExpression)) {
19826 var res = action(access.argumentExpression);
19827 if (res !== undefined) {
19828 return res;
19829 }
19830 }
19831 else {
19832 // Chain interrupted by non-static-name access 'x[expr()].y.z'
19833 return undefined;
19834 }
19835 }
19836 if (isAccessExpression(access.expression)) {
19837 return walkAccessExpression(access.expression);
19838 }
19839 if (ts.isIdentifier(access.expression)) {
19840 // End of chain at Identifier 'x.y.z'
19841 return action(access.expression);
19842 }
19843 // End of chain at non-Identifier 'x().y.z'
19844 return undefined;
19845 }
19846 }
19847 ts.forEachNameInAccessChainWalkingLeft = forEachNameInAccessChainWalkingLeft;
19848 function getLeftmostExpression(node, stopAtCallExpressions) {

Callers 1

Calls 2

actionFunction · 0.85
isAccessExpressionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…