This repository has been archived on 2023-09-10. You can view files and clone it, but cannot push or open issues/pull-requests.
joko/lib/Function.hpp

27 lines
416 B
C++

#ifndef jk_FUNCTION_HPP
#define jk_FUNCTION_HPP
#include "commons.hpp"
namespace jk
{
class Value;
using value_t = std::shared_ptr<Value>;
using foreign_t = std::function<value_t(std::vector<value_t>)>;
class Function
{
public:
explicit Function(foreign_t foreign);
virtual ~Function();
value_t call(std::vector<value_t> const& args);
private:
foreign_t m_foreign;
};
}
#endif