Represents an expression. This is the class other parts of the program interact with. It is a wrapper around the BaseExpression hierarchy.
DEFINITION
class Expression;
enum BinaryOperation
DEFINITION
enum BinaryOperation;
| VALUE | DESCRIPTION |
ADD |
|
BITWISE_AND |
|
BITWISE_OR |
|
BITWISE_XOR |
|
DIVIDE |
|
EQUAL |
|
GREATER |
|
GREATER_EQUAL |
|
LESS |
|
LESS_EQUAL |
|
LOGICAL_AND |
|
LOGICAL_OR |
|
MODULO |
|
MULTIPLY |
|
NOT_EQUAL |
|
SHIFT_LEFT |
|
SHIFT_RIGHT |
|
SUBTRACT |
|
enum UnaryOperation
DEFINITION
enum UnaryOperation;
| VALUE | DESCRIPTION |
BANK_BYTE |
|
BITWISE_NOT |
|
HIGH_BYTE |
|
LOW_BYTE |
|
MINUS |
|
NOT |
|
PLUS |
|
constructor Expression
DEFINITION
|
Expression |
( |
std::shared_ptr< BaseExpression > expression | ); |
| PARAMETER | DESCRIPTION |
expression |
|
constructor Expression
DEFINITION
|
Expression |
( |
const Location & location, |
| | const Expression & left, |
| | BinaryOperation operation, |
| | const Expression & right | ); |
| PARAMETER | DESCRIPTION |
location |
|
left |
|
operation |
|
right |
|
constructor Expression
DEFINITION
|
Expression |
( |
const Location & location, |
| | Symbol name | ); |
| PARAMETER | DESCRIPTION |
location |
|
name |
|
constructor Expression
DEFINITION
|
Expression |
( |
const Location & location, |
| | Symbol name, |
| | const std::vector< Expression > & arguments | ); |
| PARAMETER | DESCRIPTION |
location |
|
name |
|
arguments |
|
constructor Expression
DEFINITION
|
Expression |
( |
const Location & location, |
| | Object * object | ); |
| PARAMETER | DESCRIPTION |
location |
|
object |
|
constructor Expression
DEFINITION
|
Expression |
( |
const Location & location, |
| | const Entity * object, |
| | Symbol label_name, |
| | const SizeRange & offset = SizeRange(0, {}), |
| | const SizeRange & scope_offset = SizeRange(0, {}), |
| | bool keep = false | ); |
| PARAMETER | DESCRIPTION |
location |
|
object |
|
label_name |
|
offset |
|
scope_offset |
|
keep |
|
constructor Expression
DEFINITION
|
Expression |
( |
const Location & location, |
| | Symbol object_name, |
| | Symbol label_name, |
| | const SizeRange & offset = SizeRange(0, {}) | ); |
| PARAMETER | DESCRIPTION |
location |
|
object_name |
|
label_name |
|
offset |
|
constructor Expression
DEFINITION
|
Expression |
( |
const Location & location, |
| | UnaryOperation operation, |
| | const Expression & operand | ); |
| PARAMETER | DESCRIPTION |
location |
|
operation |
|
operand |
|
constructor Expression
DEFINITION
|
Expression |
( |
const Location & location, |
| | LabelExpressionType type, |
| | size_t unnamed_index = std::numeric_limits< size_t >::max(), |
| | const SizeRange & offset = SizeRange(0, {}) | ); |
| PARAMETER | DESCRIPTION |
location |
|
type |
|
unnamed_index |
|
offset |
|
constructor Expression
DEFINITION
|
Expression |
( |
const Location & location, |
| | bool value | ); |
| PARAMETER | DESCRIPTION |
location |
|
value |
|
constructor Expression
DEFINITION
|
Expression |
( |
const Location & location, |
| | uint64_t value | ); |
| PARAMETER | DESCRIPTION |
location |
|
value |
|
constructor Expression
DEFINITION
|
Expression |
( |
const Location & location, |
| | const Value & value | ); |
| PARAMETER | DESCRIPTION |
location |
|
value |
|
constructor Expression
DEFINITION
|
Expression |
( |
Tokenizer & tokenizer | ); |
| PARAMETER | DESCRIPTION |
tokenizer |
|
constructor Expression
DEFINITION
|
Expression |
( |
const Token & value | ); |
| PARAMETER | DESCRIPTION |
value |
|
method as_binaryconst
DEFINITION
|
const BinaryExpression * as_binary |
( |
) const; |
| RETURNS | DESCRIPTION |
const BinaryExpression * |
|
method as_objectconst
DEFINITION
|
const ObjectExpression * as_object |
( |
) const; |
| RETURNS | DESCRIPTION |
const ObjectExpression * |
|
method as_object_nameconst
DEFINITION
|
const ObjectNameExpression * as_object_name |
( |
) const; |
| RETURNS | DESCRIPTION |
const ObjectNameExpression * |
|
method as_variableconst
DEFINITION
|
const VariableExpression * as_variable |
( |
) const; |
| RETURNS | DESCRIPTION |
const VariableExpression * |
|
method collect_objectsconst
DEFINITION
|
void collect_objects |
( |
std::unordered_set< Object * > & variables | ) const; |
| PARAMETER | DESCRIPTION |
variables |
|
method evaluate
DEFINITION
|
bool evaluate |
( |
const EvaluationContext & context | ); |
| PARAMETER | DESCRIPTION |
context |
|
method evaluatedconst
DEFINITION
|
std::optional< Expression > evaluated |
( |
const EvaluationContext & context | ) const; |
| PARAMETER | DESCRIPTION |
context |
|
| RETURNS | DESCRIPTION |
std::optional< Expression > |
|
method get_expressionconst
DEFINITION
|
std::shared_ptr< BaseExpression > get_expression |
( |
) const; |
| RETURNS | DESCRIPTION |
std::shared_ptr< BaseExpression > |
|
method has_valueconst
DEFINITION
|
bool has_value |
( |
) const; |
method is_binaryconst
DEFINITION
|
bool is_binary |
( |
) const; |
method is_objectconst
DEFINITION
|
bool is_object |
( |
) const; |
method is_object_nameconst
DEFINITION
|
bool is_object_name |
( |
) const; |
method is_uniqueconst
DEFINITION
|
bool is_unique |
( |
) const; |
method is_variableconst
DEFINITION
|
bool is_variable |
( |
) const; |
method locationconst
DEFINITION
|
const Location & location |
( |
) const; |
| RETURNS | DESCRIPTION |
const Location & |
|
method maximum_valueconst
DEFINITION
|
std::optional< Value > maximum_value |
( |
) const; |
| RETURNS | DESCRIPTION |
std::optional< Value > |
|
method minimum_valueconst
DEFINITION
|
std::optional< Value > minimum_value |
( |
) const; |
| RETURNS | DESCRIPTION |
std::optional< Value > |
|
method serializeconst
DEFINITION
|
void serialize |
( |
std::ostream & stream | ) const; |
| PARAMETER | DESCRIPTION |
stream |
|
method typeconst
DEFINITION
|
std::optional< Value::Type > type |
( |
) const; |
| RETURNS | DESCRIPTION |
std::optional< Value::Type > |
|
method valueconst
DEFINITION
|
std::optional< Value > value |
( |
) const; |
| RETURNS | DESCRIPTION |
std::optional< Value > |
|
method variable_nameconst
DEFINITION
|
Symbol variable_name |
( |
) const; |
| RETURNS | DESCRIPTION |
Symbol |
|