1*af732203SDimitry Andric //===-- CommandObjectScript.h -----------------------------------*- C++ -*-===//
2*af732203SDimitry Andric //
3*af732203SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*af732203SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*af732203SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*af732203SDimitry Andric //
7*af732203SDimitry Andric //===----------------------------------------------------------------------===//
8*af732203SDimitry Andric 
9*af732203SDimitry Andric #ifndef LLDB_SOURCE_INTERPRETER_COMMANDOBJECTSCRIPT_H
10*af732203SDimitry Andric #define LLDB_SOURCE_INTERPRETER_COMMANDOBJECTSCRIPT_H
11*af732203SDimitry Andric 
12*af732203SDimitry Andric #include "lldb/Interpreter/CommandObject.h"
13*af732203SDimitry Andric 
14*af732203SDimitry Andric namespace lldb_private {
15*af732203SDimitry Andric 
16*af732203SDimitry Andric class CommandObjectScript : public CommandObjectRaw {
17*af732203SDimitry Andric public:
18*af732203SDimitry Andric   CommandObjectScript(CommandInterpreter &interpreter);
19*af732203SDimitry Andric   ~CommandObjectScript() override;
GetOptions()20*af732203SDimitry Andric   Options *GetOptions() override { return &m_options; }
21*af732203SDimitry Andric 
22*af732203SDimitry Andric   class CommandOptions : public Options {
23*af732203SDimitry Andric   public:
CommandOptions()24*af732203SDimitry Andric     CommandOptions() : Options() {}
25*af732203SDimitry Andric     ~CommandOptions() override = default;
26*af732203SDimitry Andric     Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_arg,
27*af732203SDimitry Andric                           ExecutionContext *execution_context) override;
28*af732203SDimitry Andric     void OptionParsingStarting(ExecutionContext *execution_context) override;
29*af732203SDimitry Andric     llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
30*af732203SDimitry Andric     lldb::ScriptLanguage language = lldb::eScriptLanguageNone;
31*af732203SDimitry Andric   };
32*af732203SDimitry Andric 
33*af732203SDimitry Andric protected:
34*af732203SDimitry Andric   bool DoExecute(llvm::StringRef command, CommandReturnObject &result) override;
35*af732203SDimitry Andric 
36*af732203SDimitry Andric private:
37*af732203SDimitry Andric   CommandOptions m_options;
38*af732203SDimitry Andric };
39*af732203SDimitry Andric 
40*af732203SDimitry Andric } // namespace lldb_private
41*af732203SDimitry Andric 
42*af732203SDimitry Andric #endif // LLDB_SOURCE_INTERPRETER_COMMANDOBJECTSCRIPT_H
43