Spicy
Public Member Functions | Static Public Member Functions | List of all members
hilti::type::Enum Class Reference

#include <enum.h>

Inheritance diagram for hilti::type::Enum:
hilti::TypeBase hilti::type::trait::isAllocable hilti::type::trait::isParameterized hilti::type::trait::isSortable hilti::NodeBase hilti::trait::isType hilti::trait::isNode hilti::trait::isNode

Public Member Functions

 Enum (std::vector< enum_::Label > l, Meta m=Meta())
 
 Enum (Wildcard, Meta m=Meta())
 
std::vector< std::reference_wrapper< const enum_::Label > > labels () const
 
std::vector< std::reference_wrapper< const enum_::Label > > uniqueLabels () const
 
hilti::optional_ref< const enum_::Labellabel (const ID &id) const
 
auto labelDeclarationRefs ()
 
bool operator== (const Enum &other) const
 
auto isEqual (const Type &other) const
 
auto _isResolved (ResolvedState *rstate) const
 
auto typeParameters () const
 
auto isWildcard () const
 
auto properties () const
 
- Public Member Functions inherited from hilti::NodeBase
 NodeBase (Meta meta)
 
 NodeBase (std::vector< Node > children, Meta meta)
 
template<typename T >
const T & child (int i) const
 
template<typename T >
void assertChildIsA (int i)
 
template<typename T >
auto children (int begin, int end) const
 
auto childRefs (int begin, int end)
 
template<typename T >
hilti::node::Set< T > childrenOfType () const
 
template<typename T >
std::vector< NodeRefchildRefsOfType () const
 
void addChild (Node n)
 
const auto & children () const
 
auto & children ()
 
auto & meta () const
 
void setMeta (Meta m)
 
bool pruneWalk () const
 

Static Public Member Functions

static void initLabelTypes (Node *n)
 

Detailed Description

AST node for an enum type.

Member Function Documentation

◆ _isResolved()

auto hilti::type::Enum::_isResolved ( ResolvedState *  rstate) const
inline

Implements the Type interface.

◆ initLabelTypes()

void type::Enum::initLabelTypes ( Node n)
static

Helper method for the resolver to link labels to their type.

◆ isEqual()

auto hilti::type::Enum::isEqual ( const Type other) const
inline

Implements the Type interface.

◆ isWildcard()

auto hilti::type::Enum::isWildcard ( ) const
inline

Implements the Type interface.

◆ properties()

auto hilti::type::Enum::properties ( ) const
inline

Implements the Node interface.

◆ typeParameters()

auto hilti::type::Enum::typeParameters ( ) const
inline

Implements the Type interface.

◆ uniqueLabels()

std::vector< std::reference_wrapper< const type::enum_::Label > > type::Enum::uniqueLabels ( ) const

Filters a set of labels so that it includes each enumator value at most once.


The documentation for this class was generated from the following files: