2022-01-16 01:25:47 +00:00
|
|
|
use anyhow::Result;
|
|
|
|
use fs_err as fs;
|
|
|
|
|
|
|
|
fn main() -> Result<()> {
|
|
|
|
let tree = fs::read_to_string("hypercosm.hidl")?;
|
|
|
|
|
|
|
|
let tree = hidl::grammar::NamespaceParser::new().parse(&tree).unwrap();
|
|
|
|
|
|
|
|
debug2::dbg!(&tree);
|
|
|
|
|
|
|
|
let json = serde_json::to_string_pretty(&tree)?;
|
|
|
|
|
|
|
|
fs::write("hypercosm.json", &json)?;
|
|
|
|
Ok(())
|
2022-01-15 22:16:52 +00:00
|
|
|
}
|