This commit is contained in:
Andre Wagner
2026-04-29 15:18:30 -05:00
parent 635596c31d
commit 30bfb38e9a
5 changed files with 70 additions and 19 deletions

17
src/vm/value.cc Normal file
View File

@@ -0,0 +1,17 @@
#include "value.hh"
#include "../common/overloaded.hh"
namespace tyche {
Type Value::type() const
{
return std::visit(overloaded {
[](std::monostate) { return Type::Nil; },
[](int32_t) { return Type::Integer; },
[](float) { return Type::Float; },
[](std::string const&) { return Type::String; },
}, value_);
}
}