Skip to content

ExistsExpression

class ExistsExpression

Represents an exists expression, which checks if a name refers to a constant or object: .exists(hook_function).

DEFINITION
class ExistsExpression;

constructor ExistsExpression

DEFINITION
ExistsExpression ( const Location & location,
Symbol  symbol );
PARAMETERDESCRIPTION
location
symbol

method createstatic

DEFINITION
static Expression  create ( const Location & location,
const std::vector< Expression > & arguments );
PARAMETERDESCRIPTION
location
arguments
RETURNSDESCRIPTION
Expression

method evaluatedconstvirtual

DEFINITION
virtual std::optional< Expression >  evaluated ( const EvaluationContext & context ) const;
PARAMETERDESCRIPTION
context
RETURNSDESCRIPTION
std::optional< Expression >

method serialize_subconstvirtual

Serialize the expression to a stream.

This method must be implemented by derived classes.

DEFINITION
virtual void  serialize_sub ( std::ostream & stream ) const;
PARAMETERDESCRIPTION
stream

The stream to serialize to.

method typeconstvirtual

Get the type of the expression's value if it can be determined.

DEFINITION
virtual std::optional< Value::Type >  type ( ) const;
RETURNSDESCRIPTION
std::optional< Value::Type >

The type of the expression's value.