12 #include "lldb/Host/Config.h"
37 "The default scripting language.",
45 #define LLDB_OPTIONS_script
46 #include "CommandOptions.inc"
48 Status CommandObjectScript::CommandOptions::SetOptionValue(
49 uint32_t option_idx, llvm::StringRef option_arg,
52 const int short_option = m_getopt_table[option_idx].val;
54 switch (short_option) {
57 option_arg, GetDefinitions()[option_idx].enum_values,
60 error.SetErrorStringWithFormat(
"unrecognized value for language '%s'",
61 option_arg.str().c_str());
64 llvm_unreachable(
"Unimplemented option");
70 void CommandObjectScript::CommandOptions::OptionParsingStarting(
75 llvm::ArrayRef<OptionDefinition>
76 CommandObjectScript::CommandOptions::GetDefinitions() {
77 return llvm::makeArrayRef(g_script_options);
82 interpreter,
"script",
83 "Invoke the script interpreter with provided code and display any "
84 "results. Start the interactive interpreter if no code is supplied.",
85 "script [--language <scripting-language> --] [<script-code>]") {}
107 "the script-lang setting is set to none - scripting not available");
114 if (script_interpreter ==
nullptr) {
123 if (command.empty()) {