Spicy
Public Member Functions | Static Public Member Functions | List of all members
hilti::expression::Keyword Class Reference

#include <keyword.h>

Inheritance diagram for hilti::expression::Keyword:
hilti::NodeBase hilti::trait::isExpression hilti::trait::isNode hilti::trait::isNode

Public Member Functions

 Keyword (keyword::Kind kind, Meta m=Meta())
 
 Keyword (keyword::Kind kind, Type t, Meta m=Meta())
 
 Keyword (keyword::Kind kind, NodeRef d, Meta m=Meta())
 
keyword::Kind kind () const
 
bool hasType () const
 
bool isSet () const
 
bool operator== (const Keyword &other) const
 
bool isLhs () const
 
bool isTemporary () const
 
Type type () const
 
auto isConstant () const
 
auto isEqual (const Expression &other) const
 
auto properties () 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 ()
 

Static Public Member Functions

static Expression setType (const Keyword &e, const Type &t)
 

Detailed Description

AST node for an expression representing a reservered keyword.

Member Function Documentation

◆ isConstant()

auto hilti::expression::Keyword::isConstant ( ) const
inline

Implements Expression interface.

◆ isEqual()

auto hilti::expression::Keyword::isEqual ( const Expression &  other) const
inline

Implements Expression interface.

◆ isLhs()

bool hilti::expression::Keyword::isLhs ( ) const
inline

Implements Expression interface.

◆ isSet()

bool hilti::expression::Keyword::isSet ( ) const
inline

Returns true if the keyword expression has been resolved to a known type.

◆ isTemporary()

bool hilti::expression::Keyword::isTemporary ( ) const
inline

Implements Expression interface.

◆ properties()

auto hilti::expression::Keyword::properties ( ) const
inline

Implements Node interface.

◆ setType()

static Expression hilti::expression::Keyword::setType ( const Keyword e,
const Type &  t 
)
inlinestatic

Returns a new keyword expression with the resulting type replaced.

Parameters
doriginal expression
tnew type
Returns
new expression that's equal to original one but with the resulting type replaced

◆ type()

Type hilti::expression::Keyword::type ( ) const
inline

Implements Expression interface.


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