#pragma once #include #include #include namespace hex::pl { class ASTNode; class Validator { public: Validator(); bool validate(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); } }; }