9 #include <hilti/ast/type.h> 10 #include <hilti/ast/types/unknown.h> 25 _type(std::make_shared<std::shared_ptr<Node>>(std::make_shared<Node>(type::unknown))) {}
27 const Type& type()
const {
return (*_type)->as<Type>(); }
29 auto isSet()
const {
return ! (*_type)->isA<
type::Unknown>(); }
31 Node& typeNode()
const {
return **_type; }
33 void linkTo(
const Auto& other) { *_type = *other._type; }
35 bool operator==(
const Auto& other)
const {
return _type.get() == other._type.get(); }
38 bool isEqual(
const Type& other)
const {
return type() == other; }
47 std::vector<Node> typeParameters()
const {
return type().typeParameters(); }
48 bool isWildcard()
const {
return type().isWildcard(); }
49 Type iteratorType(
bool const_)
const {
return type().iteratorType(const_); }
50 Type viewType()
const {
return type().viewType(); }
51 Type dereferencedType()
const {
return type().dereferencedType(); }
52 Type elementType()
const {
return type().elementType(); }
58 std::shared_ptr<std::shared_ptr<Node>> _type;
auto properties() const
Definition: auto.h:55
std::map< std::string, node::detail::PropertyValue > Properties
Definition: node.h:83
Type effectiveType() const
Definition: auto.h:40
bool isEqual(const Type &other) const
Definition: auto.h:38