use shm_rs::static_scheme::generator::RustCode; use shm_rs::static_scheme::init; use shm_rs::dynamic_scheme::environment; use shm_rs::RustCodeDerives; fn main() { let curdir = std::env::current_dir().unwrap(); println!("{}", curdir.display()); let schm = init::SchemeInit::new_with_path(curdir).unwrap(); let res = schm.run_from_file("examples/another/init_l.shm", None).unwrap(); let resser = res.get("logsmon").unwrap().clone(); let mut rc = RustCode::new(vec![RustCodeDerives::Debug], vec![], None); println!("Structures: "); match resser.generate_rust_code(&mut rc) { Ok(_) => { println!("{}", rc); }, Err(e) => { println!("{}", e); } } let anres = resser.analyze().unwrap(); println!("errors:\n{}", anres); let mut curdir = std::env::current_dir().unwrap(); curdir.push("examples/another/data_l.shm"); let (_, _dyn_res) = environment::DynEnvironment::from_file(curdir, resser.clone()).unwrap(); let resser = res.get("logsmon").unwrap().clone(); let anres = resser.analyze().unwrap(); println!("errors:\n{}", anres); }