Represents a label expression, which refers to a label in an object or the next/previous unnamed label: label_name, :+, :-.
DEFINITION
class LabelExpression;
constructor LabelExpression
DEFINITION
|
LabelExpression |
( |
const Location & location, |
| | const Entity * object, |
| | Symbol label_name, |
| | const SizeRange & offset | ); |
| PARAMETER | DESCRIPTION |
location |
|
object |
|
label_name |
|
offset |
|
constructor LabelExpression
DEFINITION
|
LabelExpression |
( |
const Location & location, |
| | Symbol object_name, |
| | Symbol label_name | ); |
| PARAMETER | DESCRIPTION |
location |
|
object_name |
|
label_name |
|
constructor LabelExpression
DEFINITION
|
LabelExpression |
( |
const Location & location, |
| | Symbol object_name, |
| | Symbol label_name, |
| | const SizeRange & offset | ); |
| PARAMETER | DESCRIPTION |
location |
|
object_name |
|
label_name |
|
offset |
|
constructor LabelExpression
DEFINITION
|
LabelExpression |
( |
const Location & location, |
| | LabelExpressionType type, |
| | size_t unnamed_index, |
| | const SizeRange & offset | ); |
| PARAMETER | DESCRIPTION |
location |
|
type |
|
unnamed_index |
|
offset |
|
method createstatic
DEFINITION
|
static Expression create |
( |
const Location & location, |
| | const std::vector< Expression > & arguments | ); |
| PARAMETER | DESCRIPTION |
location |
|
arguments |
|
| RETURNS | DESCRIPTION |
Expression |
|
method createstatic
DEFINITION
|
static Expression create |
( |
const Location & location, |
| | const Entity * object, |
| | Symbol label_name, |
| | const SizeRange & offset, |
| | const SizeRange & scope_offset = SizeRange(0), |
| | bool keep = false | ); |
| PARAMETER | DESCRIPTION |
location |
|
object |
|
label_name |
|
offset |
|
scope_offset |
|
keep |
|
| RETURNS | DESCRIPTION |
Expression |
|
method createstatic
DEFINITION
|
static Expression create |
( |
const Location & location, |
| | LabelExpressionType type, |
| | size_t unnamed_index = std::numeric_limits< size_t >::max(), |
| | SizeRange offset = SizeRange(0, {}) | ); |
| PARAMETER | DESCRIPTION |
location |
|
type |
|
unnamed_index |
|
offset |
|
| RETURNS | DESCRIPTION |
Expression |
|
method evaluatedconstvirtual
DEFINITION
|
virtual std::optional< Expression > evaluated |
( |
const EvaluationContext & context | ) const; |
| PARAMETER | DESCRIPTION |
context |
|
| RETURNS | DESCRIPTION |
std::optional< Expression > |
|
method maximum_valueconstvirtual
Get the maximum possible value of the expression if it can be determined.
DEFINITION
|
virtual std::optional< Value > maximum_value |
( |
) const; |
| RETURNS | DESCRIPTION |
std::optional< Value > |
The maximum possible value of the expression.
|
method minimum_valueconstvirtual
Get the minimum possible value of the expression if it can be determined.
DEFINITION
|
virtual std::optional< Value > minimum_value |
( |
) const; |
| RETURNS | DESCRIPTION |
std::optional< Value > |
The minimum possible value of the 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 typeconstvirtual
Get the type of the expression's value if it can be determined.
DEFINITION
|
virtual std::optional< Value::Type > type |
( |
) const; |
| RETURNS | DESCRIPTION |
std::optional< Value::Type > |
The type of the expression's value.
|
method valueconstvirtual
Get the value of the expression if it has one.
DEFINITION
|
virtual std::optional< Value > value |
( |
) const; |
| RETURNS | DESCRIPTION |
std::optional< Value > |
The value of the expression.
|