macro_rules! map_until_stop_and_collect {
    ($F0:expr, $($EXPR:expr, $F:expr),*) => { ... };
}
Expand description

Transformation helper to process a heterogeneous sequence of tree node containing expressions.

This macro is very similar to TreeNodeIterator::map_until_stop_and_collect to process nodes that are siblings, but it accepts an initial transformation (F0) and a sequence of pairs. Each pair is made of an expression (EXPR) and its transformation (F).

The macro builds up a tuple that contains Transformed.data result of F0 as the first element and further elements from the sequence of pairs. An element from a pair is either the value of EXPR or the Transformed.data result of F, depending on the Transformed.tnr result of previous Fs (F0 initially).

§Returns

Error if any of the transformations returns an error

Ok(Transformed<(data0, …, dataN)>) such that:

  1. transformed is true if any of the transformations had transformed true
  2. (data0, ..., dataN), where data0 is the Transformed.data from F0 and data1dataN are from either EXPR or the Transformed.data of F
  3. tnr from F0 or the last invocation of F