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

#include <struct.h>

Inheritance diagram for hilti::type::Struct:
hilti::TypeBase hilti::type::trait::isAllocable hilti::type::trait::isParameterized hilti::type::trait::takesArguments hilti::type::trait::isMutable hilti::NodeBase hilti::trait::isType hilti::trait::isNode hilti::trait::isNode

Classes

struct  AnonymousStruct
 

Public Member Functions

 Struct (std::vector< Declaration > fields, Meta m=Meta())
 
 Struct (AnonymousStruct _, std::vector< Declaration > fields, Meta m=Meta())
 
 Struct (const std::vector< type::function::Parameter > &params, std::vector< Declaration > fields, Meta m=Meta())
 
 Struct (Wildcard, Meta m=Meta())
 
NodeRef selfRef () const
 
auto hasFinalizer () const
 
auto parameters () const
 
auto parameterRefs () const
 
auto fields () const
 
hilti::optional_ref< const declaration::Fieldfield (const ID &id) const
 
hilti::node::Set< const declaration::Fieldfields (const ID &id) const
 
void addField (Declaration f)
 
bool operator== (const Struct &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 setSelf (Node *n)
 

Detailed Description

AST node for a struct type.

Member Function Documentation

◆ _isResolved()

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

Implements the Type interface.

◆ isEqual()

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

Implements the Type interface.

◆ isWildcard()

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

Implements the Type interface.

◆ properties()

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

Implements the Node interface.

◆ setSelf()

static void hilti::type::Struct::setSelf ( Node n)
inlinestatic

Given an existing node wrapping a struct type, updates the contained struct type to have its self declaration initialized. The struct type's constructor cannot do this because we need the Node shell for this.

◆ typeParameters()

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

Implements the Type interface.


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