#pragma once #include #include "lang/pattern_data.hpp" #include "ast_node.hpp" #include #include #include namespace hex::lang { class Evaluator { public: Evaluator(); std::pair> evaluate(const std::vector& ast); private: std::unordered_map m_types; std::pair createStructPattern(ASTNodeVariableDecl *varDeclNode, u64 offset); std::pair createEnumPattern(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); }; }