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

Function inBody

lib/web/tern/tern.js:805–816  ·  view source on GitHub ↗
(node, pos)

Source from the content-addressed store, hash-verified

803 }
804
805 function inBody(node, pos) {
806 var body = node.body, start, end
807 if (!body) return false
808 if (Array.isArray(body)) {
809 start = body[0].start
810 end = body[body.length - 1].end
811 } else {
812 start = body.start
813 end = body.end
814 }
815 return start <= pos && end >= pos
816 }
817
818 var findExpr = exports.findQueryExpr = function(file, query, wide) {
819 if (query.end == null) throw ternError("missing .query.end field");

Callers 1

tern.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected