22 #include <boost/any.hpp>
23 #include <boost/variant.hpp>
65 virtual void visit(Visitor&)
const = 0;
82 using Attribute = boost::variant<bool, int64_t, double>;
88 using Value = boost::variant<bool, int64_t, double, AttributeSet>;
104 template <
typename T>
115 virtual ~Node() =
default;
131 template <
typename... Args>
137 template <
typename... Args>
144 return eval(context, arguments);
147 template <
typename A0,
typename... AN>
175 #endif // PYSTON_NODE_H
virtual ~NodeBase()=default
T eval(const Context &context, Args...args) const
boost::variant< bool, int64_t, double > Attribute
T eval(Args...args) const
T eval_helper(const Context &context, Arguments &arguments, A0 v0, AN...an) const
boost::variant< bool, int64_t, double, AttributeSet > Value
virtual T eval(const Context &, const Arguments &) const =0
NodeBase(const std::type_index &type_index)
const std::type_index m_type_index
const std::type_index & type() const
virtual void exit(const NodeBase *)=0
T eval_helper(const Context &context, Arguments &arguments) const
virtual void enter(const NodeBase *)=0
virtual void visit(Visitor &) const =0
virtual std::string repr() const =0