wisp/src/main.rs

19 lines
450 B
Rust
Raw Normal View History

#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
2022-07-20 17:56:00 -05:00
use web_lisp::parser;
fn main() -> Result<(), Box<dyn std::error::Error>> {
2022-07-21 05:32:24 -05:00
match parser::read(&std::fs::read_to_string(
std::env::args().nth(1).ok_or("no filename provided")?,
)?) {
Ok(vals) => {
for val in vals {
println!("{val}");
}
}
Err(e) => eprintln!("Parse error: {e:?}"),
}
2022-07-03 17:55:19 -05:00
2022-07-20 17:56:00 -05:00
Ok(())
}