Trait Pass
pub trait Pass {
// Required method
fn process(&mut self, program: &mut Program);
}
Available on crate features
__ecma
and __utils
only.Expand description
A map from the Program to the Program.
This trait is used to implement transformations. The implementor may decide to implement [Fold] or [VisitMut] if the transform is fine to start from an arbitrary node.
Tuple of Pass implementations also implements Pass, but it’s limited to
12 items for fast compile time. If you have more passes, nest it like (a, (b, c), (d, e))