code: function ancestorMatch(el, tokens, dividedTokens, root) {
        var cand
        // recursively work backwards through the tokens and up the dom, covering all options
        function crawl(e, i, p) {
          while (p = walker[dividedTokens[i]](p, e)) {
            if (isNode(p) && (found = interpret.apply(p, q(tokens[i])))) {
              if (i) {
                if (cand = crawl(p, i - 1, p)) return cand
              } else return p
            }
          }
        }
        return (cand = crawl(el, tokens.length - 1, el)) && (!root || isAncestor(cand, root))
      }
docs: given elements matching the right-most part of a selector, filter out any that don't match the rest