mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-01 21:17:44 -05:00
Language refactoring, added builtin function registry
This commit is contained in:
@@ -73,4 +73,15 @@ namespace hex {
|
||||
return *SharedData::get().commandPaletteCommands;
|
||||
}
|
||||
|
||||
|
||||
/* Pattern Language Functions */
|
||||
|
||||
void ContentRegistry::PatternLanguageFunctions::add(std::string_view name, u32 parameterCount, const std::function<hex::lang::ASTNode*(std::vector<hex::lang::ASTNode*>)> &func) {
|
||||
(*SharedData::get().patternLanguageFunctions)[name.data()] = Function{ parameterCount, func };
|
||||
}
|
||||
|
||||
std::map<std::string, ContentRegistry::PatternLanguageFunctions::Function> ContentRegistry::PatternLanguageFunctions::getEntries() {
|
||||
return *SharedData::get().patternLanguageFunctions;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user