MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / handleId

Function handleId

lib/web/tern/infer.js:2083–2090  ·  view source on GitHub ↗
(node, scope, ancestors)

Source from the content-addressed store, hash-verified

2081
2082 exports.findRefs = function(ast, baseScope, name, refScope, f) {
2083 function handleId(node, scope, ancestors) {
2084 if (node.name != name ||
2085 (node == ast.id && ast.type == "FunctionDeclaration")) return;
2086 for (var s = scope; s; s = s.prev) {
2087 if (s == refScope) f(node, scope, ancestors);
2088 if (name in s.props) return;
2089 }
2090 }
2091 walk.ancestor(ast, {Identifier: handleId, VariablePattern: handleId},
2092 exports.fullVisitor, baseScope)
2093 };

Callers

nothing calls this directly

Calls 1

fFunction · 0.50

Tested by

no test coverage detected