#ifndef EXCEPTIONS_HPP
#define EXCEPTIONS_HPP

#include "symbol.hpp"
#include <string>
#include <vector>

struct parser_exception {};

struct no_function_match_exception {
    std::string              name;
    std::string              prototype;
    std::vector<std::string> available;
};

struct no_binary_operator_match_exception {
    std::string s1;
    std::string s2;
    std::string op;

    no_binary_operator_match_exception(const symbol& s1, const std::string& op, const symbol& s2) :
        s1(s1.type_name()), s2(s2.type_name()), op(op) {}

    no_binary_operator_match_exception(const std::string& s1, const std::string& op, const std::string& s2) :
        s1(s1), s2(s2), op(op) {}
};

struct no_unary_operator_match_exception {
    std::string s;
    std::string op;

    no_unary_operator_match_exception(const std::string& op, const symbol& s) :
        s(s.type_name()), op(op) {}

    no_unary_operator_match_exception(const std::string& op, const std::string& s) :
        s(s), op(op) {}
};

#endif
