#ifndef EXPRESSION_HPP
#define EXPRESSION_HPP

#include "symbol.hpp"
#include "context.hpp"

class binary_expression : public symbol_impl {
    symbol s1, s2;
    std::string op;

public :
    binary_expression(symbol&& s1, const std::string& op, symbol&& s2);

    binary_expression* clone() const override;
    symbol_impl* evaluate(const interpreter_context& context) const override;
    std::string serialize(const interpreter_context& context) const override;
    const std::string& type() const override;
    bool is_litteral() const override;
    std::pair<size_t,size_t> priority(const interpreter_context& context) const override;

    static const std::string type_name;
};

class unary_expression : public symbol_impl {
    symbol s;
    std::string op;

public :
    unary_expression(const std::string& op, symbol&& s);

    unary_expression* clone() const override;
    symbol_impl* evaluate(const interpreter_context& context) const override;
    std::string serialize(const interpreter_context& context) const override;
    const std::string& type() const override;
    bool is_litteral() const override;
    std::pair<size_t,size_t> priority(const interpreter_context& context) const override;

    static const std::string type_name;
};

#endif
