![]() |
Spicy
|
#include <switch.h>
Public Member Functions | |
Case (hilti::Expression expr, Statement body, Meta m=Meta()) | |
Case (std::vector< hilti::Expression > exprs, Statement body, Meta m=Meta()) | |
Case (Default, Statement body, Meta m=Meta()) | |
auto | expressions () const |
auto | preprocessedExpressions () const |
const auto & | body () const |
bool | isDefault () const |
auto & | _bodyNode () |
auto | properties () const |
bool | operator== (const Case &other) const |
![]() | |
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< NodeRef > | childRefsOfType () const |
void | addChild (Node n) |
const auto & | childs () const |
auto & | childs () |
auto & | meta () const |
void | setMeta (Meta m) |
bool | pruneWalk () const |
Friends | |
class | hilti::statement::Switch |
AST node for a switch case type.
Note that internally, we store the expressions in a preprocessed matter: E
turns into <id> == E
, where ID is selected to match the code generator's output. Doing this allows coercion for the comparision to proceed normally. The preprocessing happens at the time the Case
gets added to a Switch
statement, and the new versions are stored separately from the original expressions.
|
inline |
Internal method for use by builder API only.
|
inline |
Implements the Node
interface.