compiler/compiler.rs
1use badargs::arg;
2
3arg!(OutFile: "output", 'o' -> String);
4arg!(Force: "force", 'f' -> bool);
5arg!(OLevel: "optimize" -> usize);
6
7fn main() {
8 let args = badargs::badargs!(OutFile, Force, OLevel);
9
10 let outfile = args.get::<OutFile>();
11 let force = args.get::<Force>();
12 let o_level = args.get::<OLevel>();
13
14 println!("output: {:?}", outfile);
15 println!("force: {:?}", force);
16 println!("o-level: {:?}", o_level);
17 println!("other args: {:?}", args.unnamed())
18}