use shm_rs::lexer::lexer; use shm_rs::static_scheme::generator::RustCode; use shm_rs::static_scheme::init; use shm_rs::RustCodeDerives; fn main() { let mut curdir = std::env::current_dir().unwrap(); curdir.push("examples/defines_init.shm"); println!("{}", curdir.display()); let lex = lexer::Lexer::from_file(curdir).unwrap(); let schm = init::SchemeInit::new().unwrap(); let res = schm.run(&lex, None).unwrap(); println!("{:?}", res); let resser = res.get("defines").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); } } }