Skip to content

File eval_impl_pp.hpp

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

Go to the documentation of this file

#define ZMBT_DEFINE_EVALUATE_IMPL(K)                                            \
template <> struct EvalImpl<Keyword::K>                                         \
    : public EvalImplBase<Keyword::K>                                           \
{                                                                               \
    using EvalImplBase<Keyword::K>::EvalImplBase;                               \
    using EvalImplBase<Keyword::K>::operator();                                 \
    Expression impl() const;                                                    \
};                                                                              \
                                                                                \
template <> Expression dispatch_eval<Keyword::K>(                               \
    ExpressionView const& self, ExpressionView const& x, EvalContext context)   \
{                                                                               \
    return EvalImpl<Keyword::K>(self, x, context)();                            \
}                                                                               \
                                                                                \
Expression EvalImpl<Keyword::K>::impl() const                                   \


#define ASSERT(cond, msg) if (!(cond)) { return ::zmbt::lang::detail::make_error_expr(msg, keyword_to_str());}