1
0
mirror of synced 2024-11-12 10:10:53 +01:00

patterns: Added base_address pragma

This commit is contained in:
WerWolv 2021-04-13 21:49:31 +02:00
parent 950598911c
commit 183b8770bb

View File

@ -43,6 +43,14 @@ namespace hex::lang {
this->m_recursionLimit = limit; this->m_recursionLimit = limit;
return true; return true;
}); });
this->m_preprocessor->addPragmaHandler("base_address", [](std::string value) {
auto baseAddress = strtoull(value.c_str(), nullptr, 0);
SharedData::currentProvider->setBaseAddress(baseAddress);
return true;
});
this->m_preprocessor->addDefaultPragmaHandlers(); this->m_preprocessor->addDefaultPragmaHandlers();
} }