forked from katzen-cafe/iowo
18 lines
316 B
Rust
18 lines
316 B
Rust
|
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))
|
||
|
}
|