8 #include <hilti/ast/declaration.h> 9 #include <hilti/ast/expression.h> 10 #include <hilti/ast/id.h> 13 namespace declaration {
21 :
NodeBase(nodes(std::move(
id), std::move(attr)), std::move(m)) {}
23 auto expression()
const {
return childs()[1].tryReferenceAs<hilti::Expression>(); }
25 bool operator==(
const Property& other)
const {
return id() == other.
id() && expression() == other.expression(); }
30 const ID&
id()
const {
return child<ID>(0); }
32 Linkage
linkage()
const {
return Linkage::Private; }
36 auto isEqual(
const Declaration& other)
const {
return node::isEqual(
this, other); }
bool isConstant() const
Definition: property.h:28
auto & childs() const
Definition: node.h:445
Linkage linkage() const
Definition: property.h:32
auto properties() const
Definition: property.h:39
const ID & id() const
Definition: property.h:30
const Node none
Definition: node.cc:12
std::string displayName() const
Definition: property.h:34
Definition: property.h:16
auto isEqual(const Declaration &other) const
Definition: property.h:36
std::map< std::string, node::detail::PropertyValue > Properties
Definition: node.h:83
Definition: declaration.h:15