#ifndef jk_VALUE_HPP #define jk_VALUE_HPP #include "commons.hpp" namespace jk { class Type; class Value { public: static std::shared_ptr make_nil(); static std::shared_ptr make_int(int val); explicit Value() = default; virtual ~Value() = default; int as_int() const { return *m_int_val; } std::weak_ptr type() const; private: std::shared_ptr m_type; std::optional m_int_val; }; } #endif