impr: Handle demangling of identifiers without leading underscore

This commit is contained in:
WerWolv
2024-07-11 20:38:22 +02:00
parent c311b5315f
commit 1e18935513
7 changed files with 37 additions and 8 deletions

View File

@@ -7,7 +7,7 @@
#include <pl/core/token.hpp>
#include <pl/core/evaluator.hpp>
#include <llvm/Demangle/Demangle.h>
#include <content/helpers/demangle.hpp>
#include <pl/patterns/pattern.hpp>
namespace hex::plugin::builtin {
@@ -75,7 +75,7 @@ namespace hex::plugin::builtin {
ContentRegistry::PatternLanguage::addFunction(nsHexDec, "demangle", FunctionParameterCount::exactly(1), [](Evaluator *, auto params) -> std::optional<Token::Literal> {
const auto mangledString = params[0].toString(false);
return llvm::demangle(mangledString);
return hex::plugin::builtin::demangle(mangledString);
});
}