fn rewrite_redundant_return_undefined() -> Rewrite {
    let mut searcher = egg::RecExpr::default();
    let undefined_id = searcher.add(ENodeOrVar::ENode(Expression::Undefined));
    searcher.add(ENodeOrVar::ENode(Expression::BlockReturn {
        children: [undefined_id],
    }));

    let mut applier = egg::RecExpr::default();
    applier.add(ENodeOrVar::ENode(Expression::BlockReturnVoid));

    Rewrite::new(
        egg::Symbol::from("redundant_return_undefined"),
        egg::Pattern::new(searcher),
        egg::Pattern::new(applier),
    )
    .unwrap()
}
// `return undefined` in JavaScript is redundant
`return undefined` in JavaScript is redundant
` return undefined ` in JavaScript is redundant
fn rewrite_redundant_return_undefined() -> Rewrite {
    let mut searcher = egg::RecExpr::default();
    let undefined_id = searcher.add(ENodeOrVar::ENode(Expression::Undefined));
    searcher.add(ENodeOrVar::ENode(Expression::BlockReturn {
        children: [undefined_id],
    }));
    let mut applier = egg::RecExpr::default();
    applier.add(ENodeOrVar::ENode(Expression::BlockReturnVoid));
    Rewrite::new(
        egg::Symbol::from("redundant_return_undefined"),
        egg::Pattern::new(searcher),
        egg::Pattern::new(applier),
    )
    .unwrap()
}
fn rewrite_redundant_return_undefined ( ) -> Rewrite { let mut searcher = egg :: RecExpr :: default ( ) ; let undefined_id = searcher . add ( ENodeOrVar :: ENode ( Expression :: Undefined ) ) ; searcher . add ( ENodeOrVar :: ENode ( Expression :: BlockReturn { children : [ undefined_id ] , } ) ) ; let mut applier = egg :: RecExpr :: default ( ) ; applier . add ( ENodeOrVar :: ENode ( Expression :: BlockReturnVoid ) ) ; Rewrite :: new ( egg :: Symbol :: from ( " " ) , egg :: Pattern :: new ( searcher ) , egg :: Pattern :: new ( applier ) , ) . unwrap ( ) }
`return undefined` in JavaScript is redundant
` return undefined ` in JavaScript is redundant