#pragma once #include #include "providers/provider.hpp" #include "lang/pattern_data.hpp" #include "ast_node.hpp" #include #include #include namespace hex::lang { class Evaluator { public: Evaluator(prv::Provider* &provider); std::pair> evaluate(const std::vector& ast); private: std::unordered_map m_types; prv::Provider* &m_provider; std::pair createStructPattern(ASTNodeVariableDecl *varDeclNode, u64 offset); std::pair createUnionPattern(ASTNodeVariableDecl *varDeclNode, u64 offset); std::pair createEnumPattern(ASTNodeVariableDecl *varDeclNode, u64 offset); std::pair createBitfieldPattern(ASTNodeVariableDecl *varDeclNode, u64 offset); std::pair createArrayPattern(ASTNodeVariableDecl *varDeclNode, u64 offset); std::pair createStringPattern(ASTNodeVariableDecl *varDeclNode, u64 offset); std::pair createCustomTypePattern(ASTNodeVariableDecl *varDeclNode, u64 offset); std::pair createBuiltInTypePattern(ASTNodeVariableDecl *varDeclNode, u64 offset); }; }