lib/utils/ast.js
function ancestor(predicate, node) {
    while ((node = node.parent)) {
        if (predicate(node)) return true;
    }

    return false;
}
function ancestor(predicate, node) {
    while ((node = node.parent)) {
        if (predicate(node)) return true;
    }

    return false;
}
function ancestor ( predicate , node ) { while ( ( node = node . parent ) ) { if ( predicate ( node ) ) return true ; } return false ; }
Determine if `node` has an ancestor satisfying `predicate`.
@param   {Function} predicate - predicate to test each ancestor against
@param   {ASTNode} node - child node to begin search at
@returns {Boolean} true if an ancestor satisfies `predicate`
Determine if node has an ancestor satisfying predicate .