|
|
@ -9,6 +9,8 @@ pub struct Args {
|
|
|
|
pub health: bool,
|
|
|
|
pub health: bool,
|
|
|
|
pub health_arg: Option<String>,
|
|
|
|
pub health_arg: Option<String>,
|
|
|
|
pub load_tutor: bool,
|
|
|
|
pub load_tutor: bool,
|
|
|
|
|
|
|
|
pub fetch_grammars: bool,
|
|
|
|
|
|
|
|
pub build_grammars: bool,
|
|
|
|
pub verbosity: u64,
|
|
|
|
pub verbosity: u64,
|
|
|
|
pub files: Vec<(PathBuf, Position)>,
|
|
|
|
pub files: Vec<(PathBuf, Position)>,
|
|
|
|
pub edit_config: bool,
|
|
|
|
pub edit_config: bool,
|
|
|
@ -32,6 +34,8 @@ impl Args {
|
|
|
|
args.health = true;
|
|
|
|
args.health = true;
|
|
|
|
args.health_arg = argv.next_if(|opt| !opt.starts_with('-'));
|
|
|
|
args.health_arg = argv.next_if(|opt| !opt.starts_with('-'));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
"--fetch-grammars" => args.fetch_grammars = true,
|
|
|
|
|
|
|
|
"--build-grammars" => args.build_grammars = true,
|
|
|
|
arg if arg.starts_with("--") => {
|
|
|
|
arg if arg.starts_with("--") => {
|
|
|
|
anyhow::bail!("unexpected double dash argument: {}", arg)
|
|
|
|
anyhow::bail!("unexpected double dash argument: {}", arg)
|
|
|
|
}
|
|
|
|
}
|
|
|
|