thisOrAncestorMatching<E extends AstNode> method Null safety

E? thisOrAncestorMatching<E extends AstNode>(
  1. Predicate<AstNode> predicate
)

Return either this node or the most immediate ancestor of this node for which the predicate returns true, or null if there is no such node.

Implementation

E? thisOrAncestorMatching<E extends AstNode>(Predicate<AstNode> predicate);