#pragma once #include #include #include #include #include #include "Value.h" // Forward declarations struct Stmt; struct Environment; struct Object { virtual ~Object(){}; }; struct Number : Object { double value; explicit Number(double value) : value(value) {} }; struct String : Object { std::string value; explicit String(std::string str) : value(str) {} ~String(){ } }; struct Boolean : Object { bool value; explicit Boolean(bool value) : value(value) {} }; struct None : public Object { }; struct Function : public Object { const std::string name; const std::vector params; const std::vector> body; const std::shared_ptr closure; Function(std::string name, std::vector params, std::vector> body, std::shared_ptr closure) : name(name), params(params), body(body), closure(closure) {} }; struct BuiltinFunction : public Object { const std::string name; const std::function, int, int)> func; BuiltinFunction(std::string name, std::function, int, int)> func) : name(name), func(func) {} };