Files
Fig/src/Evaluator/Value/structInstance.hpp
PuqiAR e28921ae02 [VER] 0.3.7-alpha
[Fix] 修复科学表达式数字解析的问题(Lexer引起) 由 Satklomi发现,感谢
[Feat] 增加Compiler相关定义,将开发BytecodeVM
[Tip] Evaluator进入Bug fix阶段,新功能延缓开发。转向VM
2026-01-14 17:28:38 +08:00

33 lines
1011 B
C++

#pragma once
#include <Context/context_forward.hpp>
#include <Value/Type.hpp>
namespace Fig
{
struct StructInstance
{
TypeInfo parentType;
ContextPtr localContext;
// ===== Constructors =====
StructInstance(TypeInfo _parentType, ContextPtr _localContext) :
parentType(_parentType), localContext(std::move(_localContext)) {}
StructInstance(const StructInstance &other) = default;
StructInstance(StructInstance &&) noexcept = default;
StructInstance &operator=(const StructInstance &) = default;
StructInstance &operator=(StructInstance &&) noexcept = default;
// ===== Comparison =====
bool operator==(const StructInstance &other) const noexcept
{
return parentType == other.parentType && localContext == other.localContext;
}
bool operator!=(const StructInstance &other) const noexcept
{
return !(*this == other);
}
};
} // namespace Fig