#pragma once #include #include "token.hpp" #include "ast_node.hpp" #include #include namespace hex::lang { class Validator { public: Validator(); bool validate(const std::vector& ast); void printAST(const std::vector& ast); const std::pair& getError() { return this->m_error; } private: std::pair m_error; using ValidatorError = std::pair; [[noreturn]] void throwValidateError(std::string_view error, u32 lineNumber) const { throw ValidatorError(lineNumber, error); } }; }