Actually display signed and floating point data in the right format

This commit is contained in:
WerWolv
2020-11-13 12:07:05 +01:00
parent 15b91c1cac
commit 0dcf02f891
5 changed files with 52 additions and 21 deletions

View File

@@ -5,14 +5,19 @@
namespace hex {
struct VariableType {
size_t size;
enum class Kind { Unsigned, Signed, FloatingPoint } kind;
};
struct Highlight {
Highlight(u64 offset, size_t size, u32 color, std::string name)
: offset(offset), size(size), color(color), name(name) {
Highlight(u64 offset, VariableType type, u32 color, std::string name)
: offset(offset), type(type), color(color), name(name) {
}
u64 offset;
size_t size;
VariableType type;
u32 color;
std::string name;
};

View File

@@ -31,7 +31,7 @@ namespace hex {
ImGui::FileBrowser m_fileBrowser;
void setHighlight(u64 offset, size_t size, std::string name, u32 color = 0);
void setHighlight(u64 offset, std::string name, lang::Token::TypeToken::Type type, size_t size = 0, u32 color = 0);
void parsePattern(char *buffer);
s32 highlightUsingDecls(std::vector<lang::ASTNode*> &ast, lang::ASTNodeTypeDecl* currTypeDeclNode, lang::ASTNodeVariableDecl* currVarDec, u64 offset, std::string name);