Update config.rs

This commit is contained in:
Shunsuke Shibayama 2024-09-03 17:18:23 +09:00
parent 31d7ad451d
commit 56e016e915
1 changed files with 16 additions and 4 deletions

View File

@ -21,7 +21,9 @@ OPTIONS
--version/-V
--verbose 0|1|2
--server Language Serverを起動
--code/-c cmd ",
--code/-c cmd
--dump-decl
--disable ",
"simplified_chinese" =>
"\
@ -36,7 +38,9 @@ OPTIONS
--version/-V
--verbose 0|1|2
--server Language Server
--code/-c cmd ",
--code/-c cmd
--dump-decl
--disable ",
"traditional_chinese" =>
"\
@ -51,7 +55,9 @@ OPTIONS
--version/-V
--verbose 0|1|2
--server Language Server
--code/-c cmd ",
--code/-c cmd
--dump-decl
--disable ",
"english" =>
"\
@ -66,7 +72,9 @@ OPTIONS
--version/-V show version
--verbose 0|1|2 verbosity level
--server start the Language Server
--code/-c cmd program passed in as string",
--code/-c cmd program passed in as string
--dump-decl output type declaration file
--disable disable specified features",
)
}
@ -109,6 +117,10 @@ pub(crate) fn parse_args() -> ErgConfig {
.parse::<u8>()
.expect("the value of `--verbose` is not a number");
}
"--disable" => {
let arg = args.next().expect("the value of `--disable` is not passed");
runtime_args.push(Box::leak(arg.into_boxed_str()));
}
"-V" | "--version" => {
println!("pylyzer {}", env!("CARGO_PKG_VERSION"));
std::process::exit(0);