pattern: Make current data offset in attributes point to start address of pattern

This commit is contained in:
WerWolv 2021-10-05 21:55:30 +02:00
parent 044e65eb20
commit e3a6ac548b
1 changed files with 4 additions and 0 deletions

View File

@ -561,6 +561,10 @@ namespace hex::pl {
};
inline void applyVariableAttributes(Evaluator *evaluator, const Attributable *attributable, PatternData *pattern) {
auto endOffset = evaluator->dataOffset();
evaluator->dataOffset() = pattern->getOffset();
ON_SCOPE_EXIT { evaluator->dataOffset() = endOffset; };
for (ASTNodeAttribute *attribute : attributable->getAttributes()) {
auto &name = attribute->getAttribute();
auto value = attribute->getValue();