reluxscript 0.1.4

Write AST transformations once. Compile to Babel, SWC, and beyond.
Documentation
// Generated by ReluxScript compiler
// Do not edit manually

use swc_common::{Span, DUMMY_SP};
use swc_ecma_ast::*;
use swc_ecma_visit::{VisitMut, VisitMutWith};

pub struct OptionalChainTest {
    // Plugin state
}

impl OptionalChainTest {
    pub fn new() -> Self {
        Self {}
    }
    
    pub fn safe_get_name(node: &Memberexpression) -> String {
        let prop = node.prop.clone();
        let name = prop.sym.clone();
        return name;
    }
    
    pub fn regular_get_name(node: &Memberexpression) -> String {
        let __property_1 = node.prop;
        let mut name = Default::default();
        if let MemberProp::Ident(__property_1) = &__property_1 {
            name = __property_1.sym.clone();
        } else {
            panic!("Expected Ident for .name access");
        }
        return name;
    }
}

impl VisitMut for OptionalChainTest {
}