fn extract_schema_access<'a>(exp: &'a EA::Exp, res: &mut Vec<&'a EA::ModuleAccess>) {
    match &exp.value {
        EA::Exp_::Name(maccess, _) => res.push(maccess),
        EA::Exp_::Pack(maccess, ..) => res.push(maccess),
        EA::Exp_::BinopExp(_, _, rhs) => extract_schema_access(rhs, res),
        EA::Exp_::IfElse(_, t, e) => {
            extract_schema_access(t, res);
            extract_schema_access(e, res);
        }
        _ => {}
    }
}
/// Extract all accesses of a schema from a schema expression.
Extract all accesses of a schema from a schema expression.
Extract all accesses of a schema from a schema expression .
fn extract_schema_access<'a>(exp: &'a EA::Exp, res: &mut Vec<&'a EA::ModuleAccess>) {
    match &exp.value {
        EA::Exp_::Name(maccess, _) => res.push(maccess),
        EA::Exp_::Pack(maccess, ..) => res.push(maccess),
        EA::Exp_::BinopExp(_, _, rhs) => extract_schema_access(rhs, res),
        EA::Exp_::IfElse(_, t, e) => {
            extract_schema_access(t, res);
            extract_schema_access(e, res);
        }
        _ => {}
    }
}
fn extract_schema_access < ' a > ( exp : & ' a EA :: Exp , res : & mut Vec < & ' a EA :: ModuleAccess > ) { match & exp . value { EA :: Exp_ :: Name ( maccess , _ ) => res . push ( maccess ) , EA :: Exp_ :: Pack ( maccess , .. ) => res . push ( maccess ) , EA :: Exp_ :: BinopExp ( _ , _ , rhs ) => extract_schema_access ( rhs , res ) , EA :: Exp_ :: IfElse ( _ , t , e ) => { extract_schema_access ( t , res ) ; extract_schema_access ( e , res ) ; } _ => { } } }
Extract all accesses of a schema from a schema expression.
Extract all accesses of a schema from a schema expression .
exp
&'a EA::Exp
res
&mut Vec<&'a EA::ModuleAccess>
exp
&'a EA::Exp
res
&mut Vec<&'a EA::ModuleAccess>