iowo/crates/lang/src/main.rs

18 lines
316 B
Rust
Raw Normal View History

2024-04-02 22:08:00 +00:00
use std::{fs, path::PathBuf};
use clap::Parser;
use lang::parser::parse;
#[derive(Parser)]
struct Args {
file: PathBuf,
}
fn main() {
let args = Args::parse();
let f = fs::read_to_string(args.file).expect("failed to read file");
println!("file: {f}\n");
println!("parsed: {:?}", parse(&f))
}