mirror of
https://forge.katzen.cafe/katzen-cafe/iowo.git
synced 2024-11-26 06:48:45 +01:00
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))
|
||
|
}
|