pub fn find_in_scope<'a, F>(
expression: &'a Expression,
predicate: F,
bfs: bool,
) -> Option<&'a Expression>Expand description
Find the first expression matching the predicate within this scope.
This does NOT traverse into subscopes.
§Arguments
expression- The root expressionpredicate- Function that returns true for matching expressionsbfs- If true, uses breadth-first search; otherwise depth-first
§Returns
The first matching expression, or None