code: function nearest(predicate, node) {
      while ((node = node.parent)) {
          if (predicate(node)) return node;
      }
  
      return undefined;
  }
docs: Find the nearest ancestor satisfying `predicate`.
  @param   {Function} predicate - predicate to test each ancestor against
  @param   {ASTNode} node - child node to begin search at
  @returns {ASTNode|undefined} nearest ancestor satisfying `predicate`, if any