Skip to content

File eval_context.hpp

File List > backends > cxx > include > zmbt > expr > eval_context.hpp

Go to the documentation of this file

#ifndef ZMBT_EXPR_EVAL_CONTEXT_HPP_
#define ZMBT_EXPR_EVAL_CONTEXT_HPP_

#include <memory>
#include <boost/json.hpp>

#include "operator.hpp"
#include "eval_log.hpp"



namespace zmbt {
namespace lang {

class ExpressionView;
struct EvalContext
{
    static EvalContext make(Operator const& op = {});
    Operator op;
    EvalLog log;
    std::shared_ptr<boost::json::object> captures;
    std::shared_ptr<std::map<boost::json::string, ExpressionView>> links;
    // boost::json::object captures;
    std::uint64_t depth;

    EvalContext();

    EvalContext operator++() const;
};

}  // namespace lang
}  // namespace zmbt

#endif