MCPcopy Create free account
hub / github.com/nodejs/node / forEachFreeIdentifier

Function forEachFreeIdentifier

test/fixtures/snapshot/typescript.js:152517–152521  ·  view source on GitHub ↗

* A free identifier is an identifier that can be accessed through name lookup as a local variable. * In the expression `x.y`, `x` is a free identifier, but `y` is not.

(node, cb)

Source from the content-addressed store, hash-verified

152515 * In the expression `x.y`, `x` is a free identifier, but `y` is not.
152516 */
152517 function forEachFreeIdentifier(node, cb) {
152518 if (ts.isIdentifier(node) && isFreeIdentifier(node))
152519 cb(node);
152520 node.forEachChild(function (child) { return forEachFreeIdentifier(child, cb); });
152521 }
152522 function isFreeIdentifier(node) {
152523 var parent = node.parent;
152524 switch (parent.kind) {

Callers 1

collectFreeIdentifiersFunction · 0.85

Calls 3

isFreeIdentifierFunction · 0.85
forEachChildMethod · 0.80
cbFunction · 0.50

Tested by

no test coverage detected