diff --git a/bin-compiler/src/main.rs b/bin-compiler/src/main.rs index a2b27c462a4ede43c6a67e9144dee32edef4206d..83de8db5f299cc16fcca761135208c724404efbd 100644 --- a/bin-compiler/src/main.rs +++ b/bin-compiler/src/main.rs @@ -1,3 +1,31 @@ +use clap::{App, Arg}; +use reowolf_rs as rw; + fn main() { - println!("Hello world"); + let app = App::new("rwc") + .author("Henger, M.") + .version(env!(CARGO_PKG_VERSION)) + .about("Reowolf compiler") + .arg( + Arg::new("input") + .long("input") + .short('i') + .help("input files") + .required(true) + .takes_value(true) + ); + + let app = app.get_matches(); + let input_files = app.values_of("input"); + if input_files.is_none() { + println!("Expected at least one input file"); + return; + } + + let input_files = input_files.unwrap(); + for input_file in input_files { + println!("Got input: {}", input_file); + } + + println!("Done!"); } \ No newline at end of file