#pragma once #include #include "token.hpp" #include #include #include #include #include namespace hex::lang { class Preprocessor { public: Preprocessor(); std::pair preprocess(const std::string& code, bool initialRun = true); void addPragmaHandler(std::string pragmaType, std::function function); void addDefaultPragmaHandlers(); const std::pair& getError() { return this->m_error; } private: std::unordered_map> m_pragmaHandlers; std::set> m_defines; std::set> m_pragmas; std::pair m_error; }; }