swc_ecma_transforms_macros/
common.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// Type of the visitor.

#[derive(Debug, Clone, Copy)]
pub enum Mode {
    Fold,
    VisitMut,
}

impl Mode {
    pub fn prefix(self) -> &'static str {
        match self {
            Mode::Fold => "fold",
            Mode::VisitMut => "visit_mut",
        }
    }
}