阶段性保存,全面修改Value为Object

This commit is contained in:
2025-12-22 19:18:43 +08:00
parent 34a56beb90
commit 271846143a
15 changed files with 334 additions and 418 deletions

View File

@@ -1,19 +0,0 @@
#include <value.hpp>
#include <Value/function.hpp>
namespace Fig
{
FunctionStruct::FunctionStruct(std::function<Value(const std::vector<Value> &)> fn,
int argc) :
id(nextId()),
isBuiltin(true),
builtin(std::move(fn)),
builtinParamCount(argc) {}
Function::Function(std::function<Value(const std::vector<Value> &)> fn,
int argc) :
__ValueWrapper(ValueType::Function)
{
data = std::make_unique<FunctionStruct>(std::move(fn), argc);
}
}; // namespace Fig