/* * Copyright (c) 2020, Matthew Olsson * Copyright (c) 2022-2023, Linus Groh * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace JS { class Symbol final : public Cell { JS_CELL(Symbol, Cell); public: [[nodiscard]] static NonnullGCPtr create(VM&, Optional description, bool is_global); virtual ~Symbol() = default; Optional const& description() const { return m_description; } bool is_global() const { return m_is_global; } ErrorOr descriptive_string() const; private: Symbol(Optional, bool); Optional m_description; bool m_is_global; }; }