2020-11-16 22:54:39 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <hex.hpp>
|
|
|
|
|
|
|
|
#include "token.hpp"
|
|
|
|
#include "ast_node.hpp"
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace hex::lang {
|
|
|
|
|
|
|
|
class Validator {
|
|
|
|
public:
|
|
|
|
Validator();
|
|
|
|
|
|
|
|
bool validate(const std::vector<ASTNode*>& ast);
|
2020-11-27 21:20:23 +01:00
|
|
|
|
|
|
|
const std::pair<u32, std::string>& getError() { return this->m_error; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::pair<u32, std::string> m_error;
|
2020-11-16 22:54:39 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|