1
0
mirror of synced 2024-11-12 02:00:52 +01:00

patterns: Fixed parent keyword

This commit is contained in:
WerWolv 2021-09-10 21:00:18 +02:00
parent 717f78ce7f
commit f96e529230

View File

@ -38,7 +38,7 @@ namespace hex::pl {
if (auto stringPart = std::get_if<std::string>(&part); stringPart != nullptr) {
if (*stringPart == "parent") {
if (currPattern == nullptr) {
if (!currMembers.empty())
if (!this->m_currMemberScope.empty())
currPattern = this->m_currMemberScope.back();
if (currPattern == nullptr)
@ -790,8 +790,8 @@ namespace hex::pl {
auto startOffset = this->m_currOffset;
for (auto &member : node->getMembers()) {
this->evaluateMember(member, memberPatterns, true);
structPattern->setMembers(memberPatterns);
}
structPattern->setMembers(memberPatterns);
structPattern->setSize(this->m_currOffset - startOffset);
this->m_currRecursionDepth--;
@ -820,8 +820,8 @@ namespace hex::pl {
for (auto &member : node->getMembers()) {
this->evaluateMember(member, memberPatterns, false);
unionPattern->setMembers(memberPatterns);
}
unionPattern->setMembers(memberPatterns);
this->m_currRecursionDepth--;