MCPcopy Index your code
hub / github.com/csev/py4e / lookup

Function lookup

tools/pythonauto/static/codemirrorepl/codemirrorepl.js:2295–2311  ·  view source on GitHub ↗
(map)

Source from the content-addressed store, hash-verified

2293 }
2294 function lookupKey(name, extraMap, map, handle, stop) {
2295 function lookup(map) {
2296 map = getKeyMap(map);
2297 var found = map[name];
2298 if (found != null && handle(found)) return true;
2299 if (map.nofallthrough) {
2300 if (stop) stop();
2301 return true;
2302 }
2303 var fallthrough = map.fallthrough;
2304 if (fallthrough == null) return false;
2305 if (Object.prototype.toString.call(fallthrough) != "[object Array]")
2306 return lookup(fallthrough);
2307 for (var i = 0, e = fallthrough.length; i < e; ++i) {
2308 if (lookup(fallthrough[i])) return true;
2309 }
2310 return false;
2311 }
2312 if (extraMap && lookup(extraMap)) return true;
2313 return lookup(map);
2314 }

Callers 1

lookupKeyFunction · 0.70

Calls 2

getKeyMapFunction · 0.70
stopFunction · 0.70

Tested by

no test coverage detected