patterns: Use standalone pattern language library instead of built-in one

This commit is contained in:
WerWolv
2022-04-17 16:57:30 +02:00
parent f5fe49923b
commit 17383083fb
92 changed files with 416 additions and 8336 deletions

View File

@@ -22,7 +22,7 @@ namespace hex::plugin::builtin {
private:
std::map<prv::Provider *, std::vector<std::shared_ptr<pl::Pattern>>> m_sortedPatterns;
hex::PatternDrawer m_drawer;
hex::PatternDrawer m_patternDrawer;
};
}

View File

@@ -1,8 +1,7 @@
#pragma once
#include <hex/ui/view.hpp>
#include <hex/pattern_language/pattern_language.hpp>
#include <hex/pattern_language/log_console.hpp>
#include <pl/pattern_language.hpp>
#include <hex/providers/provider.hpp>
#include <cstring>
@@ -79,6 +78,15 @@ namespace hex::plugin::builtin {
u64 m_envVarIdCounter;
std::list<EnvVar> m_envVarEntries;
enum class DangerousFunctionPerms : u8 {
Ask,
Allow,
Deny
};
std::atomic<bool> m_dangerousFunctionCalled = false;
std::atomic<DangerousFunctionPerms> m_dangerousFunctionsAllowed = DangerousFunctionPerms::Ask;
void drawConsole(ImVec2 size);
void drawEnvVars(ImVec2 size);
void drawVariableSettings(ImVec2 size);