![]() |
Spicy
|
#include <assert.h>
Public Member Functions | |
Assert (::hilti::Expression expr, std::optional<::hilti::Expression > msg, Meta m=Meta()) | |
Assert (assert::Exception, ::hilti::Expression expr, std::optional< Type > excpt, std::optional<::hilti::Expression > msg, Meta m=Meta()) | |
bool | expectsException () const |
const auto & | expression () const |
auto | exception () const |
auto | message () const |
void | setCondition (hilti::Expression c) |
bool | operator== (const Assert &other) const |
auto | isEqual (const Statement &other) const |
auto | properties () const |
![]() | |
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< NodeRef > | childRefsOfType () const |
void | addChild (Node n) |
const auto & | children () const |
auto & | children () |
auto & | meta () const |
void | setMeta (Meta m) |
bool | pruneWalk () const |
AST node for an assert statement.
|
inline |
Creates an assert statement that expects an exception to evaluate to true at runtime.
e | expression to evaluate at runtime |
msg | message to report an runtime if assertions fails |
m | meta information for AST node |
|
inline |
Creates an assert statement that expects an exception to occur when the expression is evaluated.
assert::Exception | tag to select this constructor |
e | expression to evaluate at runtime |
type | exception type that's expected to be thrown when e is evaluated; unset of any exception |
msg | message to report an runtime if assertions fails |
m | meta information for AST node |
|
inline |
Implements the Statement
interface.
|
inline |
Implements the Node
interface.