findAncestor
Walks the parents of this node and returns the first node of type type, or empty() if none is found. The given type may also be an interface type, such as one of the NodeWith... interface types.
Walks the parents of this node and returns the first node that matches one of types types, or empty() if none is found. The given type may also be an interface type, such as one of the NodeWith... interface types.
Parameters
<N>
Deprecated
Thismethod is no longer acceptable to find ancestor.
Use findAncestor instead.
Walks the parents of this node and returns the first node of type type that matches predicate, or empty() if none is found. The given type may also be an interface type, such as one of the NodeWith... interface types.