pub fn find_ancestor<'a, F>(
root: &'a Expression,
target: &Expression,
predicate: F,
) -> Option<&'a Expression>Expand description
Find the first ancestor of target matching predicate, walking from
parent toward root.
Uses pointer identity for target lookup. Returns None if no ancestor
matches or target is not found in the tree.