includes/hex: Added support for new demangle function

This commit is contained in:
Nik
2022-09-30 14:52:21 +02:00
committed by GitHub
parent dba93afe06
commit 27d98d4552
2 changed files with 34 additions and 0 deletions

11
includes/hex/dec.pat Normal file
View File

@@ -0,0 +1,11 @@
#pragma once
#include <hex/impl/imhex_check.pat>
namespace hex::dec {
fn demangle(str mangled_name) {
return builtin::hex::dec::demangle(mangled_name);
};
}

View File

@@ -0,0 +1,23 @@
#pragma once
#include <std/io.pat>
#include <std/mem.pat>
#include <hex/impl/imhex_check.pat>
#include <hex/dec.pat>
namespace hex::type {
struct MangledName {
char value[];
} [[sealed, format("format_mangled_name")]];
namespace impl {
fn format_mangled_name(ref MangledName name) {
return hex::dec::demangle(name.value);
};
}
}