patterns: Fixed recursive types

This commit is contained in:
WerWolv
2021-09-25 22:03:55 +02:00
parent ba97573f93
commit 9b4cf917d9
3 changed files with 37 additions and 34 deletions

View File

@@ -346,17 +346,10 @@ namespace hex::pl {
ASTNodeTypeDecl(const ASTNodeTypeDecl& other) : ASTNode(other), Attributable(other) {
this->m_name = other.m_name;
if (other.m_type != nullptr)
this->m_type = other.m_type->clone();
else
this->m_type = nullptr;
this->m_type = other.m_type;
this->m_endian = other.m_endian;
}
~ASTNodeTypeDecl() override {
delete this->m_type;
}
[[nodiscard]] ASTNode* clone() const override {
return new ASTNodeTypeDecl(*this);
}