mirror of
https://github.com/teo3300/rust-mal.git
synced 2026-01-12 01:05:32 +01:00
- functional tests - more tests - tests tests tests Signed-off-by: teo3300 <matteo.rogora@live.it>
30 lines
565 B
Rust
30 lines
565 B
Rust
// io lib to read input and print output
|
|
use std::env::args;
|
|
|
|
mod core;
|
|
mod env;
|
|
mod eval;
|
|
mod mal_tests;
|
|
mod parse_tools;
|
|
mod printer;
|
|
mod reader;
|
|
mod step4_if_fn_do;
|
|
mod types;
|
|
|
|
use core::ns_init;
|
|
use parse_tools::{interactive, load_file};
|
|
|
|
fn main() {
|
|
// Initialize ns environment
|
|
let reply_env = ns_init();
|
|
|
|
// load all files passed as arguments
|
|
args().collect::<Vec<String>>()[1..].iter().for_each(|f| {
|
|
if let Err(e) = load_file(f, &reply_env) {
|
|
println!("{}", e.message())
|
|
}
|
|
});
|
|
|
|
interactive(reply_env);
|
|
}
|