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 DeepChainTest {
    // Plugin state
}

impl DeepChainTest {
    pub fn new() -> Self {
        Self {}
    }
    
    pub fn get_property_name(member: &Memberexpression) -> String {
        let __property_1 = member.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;
    }
    
    pub fn get_property_name_safe(member: &Memberexpression) -> String {
        let property = member.prop.clone();
        if let Expr::Ident(property) = &property {
            let name = property.sym.clone();
            return name;
        }
        return "unknown";
    }
}

impl VisitMut for DeepChainTest {
}