patterns: Allow usage of types within itself and used out-of-order

This commit is contained in:
WerWolv
2021-04-13 20:40:21 +02:00
parent 8a485575f5
commit 950598911c
5 changed files with 40 additions and 18 deletions

View File

@@ -149,7 +149,10 @@ namespace hex::lang {
ASTNodeTypeDecl(const ASTNodeTypeDecl& other) : ASTNode(other), Attributable(other) {
this->m_name = other.m_name;
this->m_type = other.m_type->clone();
if (other.m_type != nullptr)
this->m_type = other.m_type->clone();
else
this->m_type = nullptr;
this->m_endian = other.m_endian;
}