Skip to main content

direct_annotations

Function direct_annotations 

Source
pub fn direct_annotations<'a, N, A>(
    expr: &'a N,
    annotate: A,
) -> Annotations<'a, A::Annotation, N>
where N: Node + Eq + Hash, A: AnnotationFn<N>,
Expand description

Walk the expression tree and annotate each expression with zero or more annotations.

Returns a map of each expression to all annotations. Annotations of children are not propagated to parents.