8 #include <hilti/ast/builder/type.h> 9 #include <hilti/ast/ctor.h> 10 #include <hilti/ast/expression.h> 11 #include <hilti/ast/types/set.h> 12 #include <hilti/ast/types/unknown.h> 21 Set(Type t, std::vector<Expression> e,
Meta m =
Meta())
22 :
NodeBase(nodes(std::move(t), std::move(e)), std::move(m)) {}
24 auto elementType()
const {
25 if (
auto t =
childs()[0].tryAs<Type>() )
26 return type::effectiveType(*t);
35 auto value()
const {
return childs<Expression>(1, -1); }
37 bool operator==(
const Set& other)
const {
return elementType() == other.elementType() && value() == other.value(); }
44 auto isLhs()
const {
return false; }
48 auto isEqual(
const Ctor& other)
const {
return node::isEqual(
this, other); }
auto & childs() const
Definition: node.h:445
auto isEqual(const Ctor &other) const
Definition: set.h:48
auto isTemporary() const
Definition: set.h:46
const Node none
Definition: node.cc:12
auto properties() const
Definition: set.h:50
std::map< std::string, node::detail::PropertyValue > Properties
Definition: node.h:83
auto isLhs() const
Definition: set.h:44
auto & meta() const
Definition: node.h:449
bool isConstant() const
Definition: set.h:42
auto type() const
Definition: set.h:40