@@ -45,15 +45,16 @@ int main(int argc, char** argv)
4545 | option (" -bcr" , " --bytecode-reader" ).set (selected, mode::bytecode_reader).doc (" Launch the bytecode reader" )
4646 ),
4747 (
48- option (" -L" , " --lib" ).doc (" Define the directory where the Ark standard library is " )
48+ option (" -L" , " --lib" ).doc (" Set the location of the ArkScript standard library" )
4949 & value (" lib_dir" , lib_dir)
5050 ),
51- (
52- ( option (" -ffunction- arity-check" ).call ([&]{ options |= Ark::FeatureFunctionArityCheck; })
53- | option (" -fno -function-arity-check" ).call ([&]{ options &= ~Ark::FeatureFunctionArityCheck; })
51+ with_prefix ( " -f " ,
52+ ( option (" function- arity-check" ).call ([&]{ options |= Ark::FeatureFunctionArityCheck; })
53+ | option (" no -function-arity-check" ).call ([&]{ options &= ~Ark::FeatureFunctionArityCheck; })
5454 ).doc (" Toggle function arity checks (default: ON)" )
55- , ( option (" -fallow-invalid-token-after-paren" ).call ([&]{ options &= ~Ark::FeatureDisallowInvalidTokenAfterParen; })
56- | option (" -fno-invalid-token-after-paren" ).call ([&]{ options |= Ark::FeatureDisallowInvalidTokenAfterParen; })
55+ ,
56+ ( option (" allow-invalid-token-after-paren" ).call ([&]{ options &= ~Ark::FeatureDisallowInvalidTokenAfterParen; })
57+ | option (" no-invalid-token-after-paren" ).call ([&]{ options |= Ark::FeatureDisallowInvalidTokenAfterParen; })
5758 ).doc (" Authorize invalid token after `(' (default: OFF). When ON, only display a warning" )
5859 )
5960 )
@@ -66,6 +67,7 @@ int main(int argc, char** argv)
6667 .doc_column (36 ) // parameter docstring start col
6768 .indent_size (2 ) // indent of documentation lines for children of a documented group
6869 .split_alternatives (true ) // split usage into several lines for large alternatives
70+ .merge_alternative_flags_with_common_prefix (true ) // [-fok] [-fno-ok] becomes [-f(ok|no-ok)]
6971 ;
7072
7173 if (parse (argc, argv, cli) && wrong.empty ())
0 commit comments