Changeset - c1fa116b0172
[Not reviewed]
0 1 0
mh - 3 years ago 2022-02-08 13:56:59
contact@maxhenger.nl
Write skeleton for compiler
1 file changed with 29 insertions and 1 deletions:
0 comments (0 inline, 0 general)
bin-compiler/src/main.rs
Show inline comments
 
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
0 comments (0 inline, 0 general)