/* * Copyright (c) 2021, Matthew Olsson * Copyright (c) 2021, Hunter Salyer * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include "DebuggerGlobalJSObject.h" #include #include #include namespace HackStudio { class DebuggerVariableJSObject final : public JS::Object { using Base = JS::Object; public: static DebuggerVariableJSObject* create(DebuggerGlobalJSObject&, const Debug::DebugInfo::VariableInfo& variable_info); DebuggerVariableJSObject(const Debug::DebugInfo::VariableInfo& variable_info, JS::Object& prototype); virtual ~DebuggerVariableJSObject() override; virtual const char* class_name() const override { return m_variable_info.type_name.characters(); } JS::ThrowCompletionOr internal_set(JS::PropertyKey const&, JS::Value value, JS::Value receiver) override; private: DebuggerGlobalJSObject& debugger_object() const; const Debug::DebugInfo::VariableInfo& m_variable_info; }; }