Represents a body of an object or macro. This is the class other parts of the program interact with. It is a wrapper around the BodyElement hierarchy.
constructor Body
DEFINITION
|
Body |
( |
Expression bank, |
| | Expression start_address, |
| | Expression end_address | ); |
| PARAMETER | DESCRIPTION |
bank |
|
start_address |
|
end_address |
|
constructor Body
DEFINITION
|
Body |
( |
const std::vector< IfBodyClause > & clauses | ); |
| PARAMETER | DESCRIPTION |
clauses |
|
constructor Body
DEFINITION
|
Body |
( |
const std::shared_ptr< BodyElement > & element | ); |
| PARAMETER | DESCRIPTION |
element |
|
constructor Body
DEFINITION
|
Body |
( |
const std::vector< Body > & elements | ); |
| PARAMETER | DESCRIPTION |
elements |
|
constructor Body
DEFINITION
|
Body |
( |
std::vector< DataBodyElement > elements | ); |
| PARAMETER | DESCRIPTION |
elements |
|
constructor Body
DEFINITION
|
Body |
( |
Location location, |
| | std::string message | ); |
| PARAMETER | DESCRIPTION |
location |
|
message |
|
constructor Body
| PARAMETER | DESCRIPTION |
name |
|
constructor Body
DEFINITION
|
Body |
( |
const Token & name, |
| | std::vector< Expression > arguments, |
| | const Macro * macro = {} | ); |
| PARAMETER | DESCRIPTION |
name |
|
arguments |
|
macro |
|
constructor Body
DEFINITION
|
Body |
( |
Symbol name, |
| | SizeRange offset, |
| | bool added_to_environment = false, |
| | size_t unnamed_index = std::numeric_limits< size_t >::max() | ); |
| PARAMETER | DESCRIPTION |
name |
|
offset |
|
added_to_environment |
|
unnamed_index |
|
constructor Body
DEFINITION
|
Body |
( |
Visibility visibility, |
| | Symbol name, |
| | Expression value | ); |
| PARAMETER | DESCRIPTION |
visibility |
|
name |
|
value |
|
method append
DEFINITION
|
void append |
( |
const Body & element | ); |
| PARAMETER | DESCRIPTION |
element |
|
method append_sub
DEFINITION
|
std::optional< Body > append_sub |
( |
const Body & element | ); |
| PARAMETER | DESCRIPTION |
element |
|
| RETURNS | DESCRIPTION |
std::optional< Body > |
|
method as_blockconst
DEFINITION
|
BlockBody * as_block |
( |
) const; |
| RETURNS | DESCRIPTION |
BlockBody * |
|
method as_dataconst
DEFINITION
|
DataBody * as_data |
( |
) const; |
| RETURNS | DESCRIPTION |
DataBody * |
|
method as_errorconst
DEFINITION
|
ErrorBody * as_error |
( |
) const; |
| RETURNS | DESCRIPTION |
ErrorBody * |
|
method as_labelconst
DEFINITION
|
LabelBody * as_label |
( |
) const; |
| RETURNS | DESCRIPTION |
LabelBody * |
|
method as_scopeconst
DEFINITION
|
ScopeBody * as_scope |
( |
) const; |
| RETURNS | DESCRIPTION |
ScopeBody * |
|
method backconst
DEFINITION
|
std::optional< Body > back |
( |
) const; |
| RETURNS | DESCRIPTION |
std::optional< Body > |
|
method collect_objectsconst
DEFINITION
|
void collect_objects |
( |
std::unordered_set< Object * > & objects | ) const; |
| PARAMETER | DESCRIPTION |
objects |
|
method encodeconst
DEFINITION
|
void encode |
( |
std::string & bytes, |
| | const Memory * memory = nullptr | ) const; |
| PARAMETER | DESCRIPTION |
bytes |
|
memory |
|
method evaluate
DEFINITION
|
bool evaluate |
( |
const EvaluationContext & context | ); |
| PARAMETER | DESCRIPTION |
context |
|
method evaluatedconst
DEFINITION
|
std::optional< Body > evaluated |
( |
const EvaluationContext & context | ) const; |
| PARAMETER | DESCRIPTION |
context |
|
| RETURNS | DESCRIPTION |
std::optional< Body > |
|
method make_uniqueconst
DEFINITION
|
Body make_unique |
( |
) const; |
method scopedconst
DEFINITION
|
Body scoped |
( |
const std::shared_ptr< Environment > & = {} | ) const; |
method serializeconst
DEFINITION
|
void serialize |
( |
std::ostream & stream, |
| | const std::string & prefix = "" | ) const; |
| PARAMETER | DESCRIPTION |
stream |
|
prefix |
|
method sizeconst
DEFINITION
|
std::optional< uint64_t > size |
( |
) const; |
| RETURNS | DESCRIPTION |
std::optional< uint64_t > |
|
method size_rangeconst
DEFINITION
|
SizeRange size_range |
( |
) const; |
| RETURNS | DESCRIPTION |
SizeRange |
|
method use_countconst
DEFINITION
|
long use_count |
( |
) const; |