8 #include <hilti/ast/node.h> 9 #include <hilti/ast/type.h> 10 #include <hilti/base/type_erase.h> 19 namespace expression {
21 #include <hilti/autogen/__expression.h> 24 inline Node to_node(Expression t) {
return Node(std::move(t)); }
27 inline std::ostream& operator<<(std::ostream& out, Expression e) {
return out << to_node(std::move(e)); }
29 inline bool operator==(
const Expression& x,
const Expression& y) {
33 assert(x.isEqual(y) == y.isEqual(x));
37 inline bool operator!=(
const Expression& e1,
const Expression& e2) {
return ! (e1 == e2); }
43 using Expression = expression::detail::Expression;
44 using expression::detail::to_node;
47 template<typename T, typename std::enable_if_t<std::is_base_of<trait::isExpression, T>::value>* =
nullptr>
48 inline Node to_node(T t) {
49 return Node(Expression(std::move(t)));
Definition: expression.h:16