#pragma once #include #include #include #include #include #include namespace hex::pl { class ASTNode; class Validator { public: Validator() = default; bool validate(const std::vector> &ast); const std::optional &getError() { return this->m_error; } private: std::optional m_error; [[noreturn]] static void throwValidatorError(const std::string &error, u32 lineNumber) { throw PatternLanguageError(lineNumber, "Validator: " + error); } }; }