use shm_rs::lexer::lexer; use shm_rs::static_scheme::generator::RustCode; use shm_rs::static_scheme::init; 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(&["Clone", "Debug", "Serialize", "Deserialize"], &["Clone", "Debug", "Serialize", "Deserialize"]); println!("Structures: "); match resser.generate_rust_structs(&mut rc) { Ok(_) => { println!("{}", rc); }, Err(e) => { println!("{}", e); } } }