use clap::Args;
#[derive(Args)]
pub struct MirArgs {
#[arg()]
file: Option<String>,
#[arg(short = 'f', long = "function")]
function: Option<String>,
#[arg(short = 'o')]
output_dir: Option<String>,
}
pub fn cmd_mir(args: MirArgs) {
let mut raw_args: Vec<String> = Vec::new();
if let Some(f) = args.file {
raw_args.push(f);
}
if let Some(ref func) = args.function {
raw_args.push("-f".to_string());
raw_args.push(func.clone());
}
if let Some(ref dir) = args.output_dir {
raw_args.push("-o".to_string());
raw_args.push(dir.clone());
}
trident::import::mir2nox::run_mir2nox(&raw_args);
}