swc_ecma_preset_env/regenerator/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use swc_ecma_visit::{noop_visit_type, Visit, VisitWith};

pub(super) fn is_required<T: VisitWith<RegeneratorVisitor>>(node: &T) -> bool {
    let mut v = RegeneratorVisitor { found: false };
    node.visit_with(&mut v);
    v.found
}

pub(super) struct RegeneratorVisitor {
    found: bool,
}

/// TODO
impl Visit for RegeneratorVisitor {
    noop_visit_type!();
}