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 itemNodes ()
 
bool isDefault () const
 
bool isLookAhead () 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 >
std::vector< T > childs (int begin, int end) const
 
template<typename T >
std::vector< T > childsOfType () const
 
template<typename T >
auto nodesOfType () const
 
template<typename T >
auto nodesOfType ()
 
void addChild (Node n)
 
auto & childs () const
 
auto & childs ()
 
auto & meta () const
 
void setMeta (Meta m)
 
const NodeReforiginalNode () const
 
void setOriginalNode (const NodeRef &n)
 
void clearCache ()
 

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.


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