mirror of
https://codeberg.org/icewind/vmt-parser.git
synced 2026-06-03 20:14:06 +02:00
14 lines
418 B
Rust
14 lines
418 B
Rust
use miette::{Context, IntoDiagnostic, Result};
|
|
use std::env::args;
|
|
use std::fs::read_to_string;
|
|
use vmt_parser::from_str;
|
|
|
|
fn main() -> Result<()> {
|
|
let path = args().nth(1).expect("no path provided");
|
|
let raw = read_to_string(path)
|
|
.into_diagnostic()
|
|
.wrap_err("failed to read input")?;
|
|
let material = from_str(&raw).wrap_err("failed to parse material")?;
|
|
dbg!(material);
|
|
Ok(())
|
|
}
|