Spicy
Public Member Functions | List of all members
spicy::type::unit::item::switch_::Case Class Reference

#include <switch.h>

Inheritance diagram for spicy::type::unit::item::switch_::Case:
hilti::NodeBase hilti::trait::isNode

Public Member Functions

 Case (std::vector< Expression > exprs, std::vector< type::unit::Item > items, Meta m=Meta())
 
 Case (std::vector< type::unit::Item > items, Meta m=Meta())
 
 Case (type::unit::Item field, Meta m=Meta())
 
auto expressions () const
 
auto items () const
 
auto itemRefs () const
 
bool isDefault () const
 
bool isLookAhead () const
 
bool isResolved () const
 
auto properties () const
 
bool operator== (const Case &other) const
 
- Public Member Functions inherited from hilti::NodeBase
 NodeBase (Meta meta)
 
 NodeBase (std::vector< Node > childs, Meta meta)
 
template<typename T >
const T & child (int i) const
 
template<typename T >
void assertChildIsA (int i)
 
template<typename T >
auto childs (int begin, int end) const
 
auto childRefs (int begin, int end)
 
template<typename T >
hilti::node::Set< T > childsOfType () const
 
template<typename T >
std::vector< NodeRefchildRefsOfType () const
 
void addChild (Node n)
 
const auto & childs () const
 
auto & childs ()
 
auto & meta () const
 
void setMeta (Meta m)
 
bool pruneWalk () const
 

Detailed Description

AST node for a unit switch's case.

Constructor & Destructor Documentation

◆ Case() [1/2]

spicy::type::unit::item::switch_::Case::Case ( std::vector< type::unit::Item >  items,
Meta  m = Meta() 
)
inline

Constructor for a default case.

◆ Case() [2/2]

spicy::type::unit::item::switch_::Case::Case ( type::unit::Item  field,
Meta  m = Meta() 
)
inline

Constructor for look-ahead case.

Member Function Documentation

◆ isDefault()

bool spicy::type::unit::item::switch_::Case::isDefault ( ) const
inline

Returns true if this is the default case.

◆ isLookAhead()

bool spicy::type::unit::item::switch_::Case::isLookAhead ( ) const
inline

Returns true if this is a look-ahead case.

◆ isResolved()

bool spicy::type::unit::item::switch_::Case::isResolved ( ) const
inline

Returns true if all items have been resolved.


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