[VER] 0.3.7-alpha
[Fix] 修复科学表达式数字解析的问题(Lexer引起) 由 Satklomi发现,感谢 [Feat] 增加Compiler相关定义,将开发BytecodeVM [Tip] Evaluator进入Bug fix阶段,新功能延缓开发。转向VM
This commit is contained in:
32
src/Evaluator/Value/structInstance.hpp
Normal file
32
src/Evaluator/Value/structInstance.hpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user