VariableExpression
class VariableExpression
Expression node representing a variable.
DEFINITION
class VariableExpression;
constructor VariableExpression
DEFINITION
| VariableExpression | ( | const Location & location, | |
| Symbol symbol | ); |
| PARAMETER | DESCRIPTION |
|---|---|
location |
The location of the expression. |
symbol |
The name of the variable. |
method evaluatedconstvirtual
DEFINITION
| virtual std::optional< Expression > evaluated | ( | const EvaluationContext & context | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
context |
| RETURNS | DESCRIPTION |
|---|---|
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; |
| PARAMETER | DESCRIPTION |
|---|---|
stream |
The stream to serialize to. |
method variableconst
Get the name of the variable.
DEFINITION
| Symbol variable | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
Symbol |
The name of the variable. |