Callable
class Callable
Represents a callable entity that can be invoked with arguments: a macro or function.
DEFINITION
class Callable;
class Arguments
DEFINITION
class Arguments;
constructor Arguments
DEFINITION
| Arguments | ( | ); |
constructor Arguments
DEFINITION
| Arguments | ( | Tokenizer & tokenizer | ); |
| PARAMETER | DESCRIPTION |
|---|---|
tokenizer |
method add
DEFINITION
| void add | ( | Symbol name, | |
| std::optional< Expression > default_argument | ); |
| PARAMETER | DESCRIPTION |
|---|---|
name |
|
default_argument |
method default_argumentconst
DEFINITION
| std::optional< Expression > default_argument | ( | size_t index | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
index |
| RETURNS | DESCRIPTION |
|---|---|
std::optional< Expression > |
method emptyconst
DEFINITION
| bool empty | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
bool |
method maximum_argumentsconst
DEFINITION
| size_t maximum_arguments | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
size_t |
method minimum_argumentsconst
DEFINITION
| size_t minimum_arguments | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
size_t |
method nameconst
DEFINITION
| Symbol name | ( | size_t index | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
index |
| RETURNS | DESCRIPTION |
|---|---|
Symbol |
method serializeconst
DEFINITION
| void serialize | ( | std::ostream & stream | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
stream |
member default_arguments
DEFINITION
std::vector< Expression > default_arguments;
member names
DEFINITION
std::vector< Symbol > names;
constructor Callable
DEFINITION
| Callable | ( | ObjectFile * owner, | |
| const Token & name, | |||
| const std::shared_ptr< StructuredValue > & definition | ); |
| PARAMETER | DESCRIPTION |
|---|---|
owner |
|
name |
|
definition |
constructor Callable
DEFINITION
| Callable | ( | ObjectFile * owner, | |
| const Token & name, | |||
| Visibility visibility, | |||
| bool default_only, | |||
| Arguments arguments | ); |
| PARAMETER | DESCRIPTION |
|---|---|
owner |
|
name |
|
visibility |
|
default_only |
|
arguments |
method argument_nameconst
DEFINITION
| Symbol argument_name | ( | size_t index | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
index |
| RETURNS | DESCRIPTION |
|---|---|
Symbol |
method bindconst
DEFINITION
| std::shared_ptr< Environment > bind | ( | const std::vector< Expression > & actual_arguments | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
actual_arguments |
| RETURNS | DESCRIPTION |
|---|---|
std::shared_ptr< Environment > |
method default_argumentconst
DEFINITION
| std::optional< Expression > default_argument | ( | size_t index | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
index |
| RETURNS | DESCRIPTION |
|---|---|
std::optional< Expression > |
method evaluation_contextvirtual
DEFINITION
| virtual EvaluationContext evaluation_context | ( | EvaluationResult & result | ); |
| PARAMETER | DESCRIPTION |
|---|---|
result |
| RETURNS | DESCRIPTION |
|---|---|
EvaluationContext |
method serialize_callableconst
DEFINITION
| void serialize_callable | ( | std::ostream & stream | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
stream |
member arguments
DEFINITION
Arguments arguments;
class Arguments
DEFINITION
class Arguments;
constructor Arguments
DEFINITION
| Arguments | ( | ); |
constructor Arguments
DEFINITION
| Arguments | ( | Tokenizer & tokenizer | ); |
| PARAMETER | DESCRIPTION |
|---|---|
tokenizer |
method add
DEFINITION
| void add | ( | Symbol name, | |
| std::optional< Expression > default_argument | ); |
| PARAMETER | DESCRIPTION |
|---|---|
name |
|
default_argument |
method default_argumentconst
DEFINITION
| std::optional< Expression > default_argument | ( | size_t index | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
index |
| RETURNS | DESCRIPTION |
|---|---|
std::optional< Expression > |
method emptyconst
DEFINITION
| bool empty | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
bool |
method maximum_argumentsconst
DEFINITION
| size_t maximum_arguments | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
size_t |
method minimum_argumentsconst
DEFINITION
| size_t minimum_arguments | ( | ) const; |
| RETURNS | DESCRIPTION |
|---|---|
size_t |
method nameconst
DEFINITION
| Symbol name | ( | size_t index | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
index |
| RETURNS | DESCRIPTION |
|---|---|
Symbol |
method serializeconst
DEFINITION
| void serialize | ( | std::ostream & stream | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
stream |
member default_arguments
DEFINITION
std::vector< Expression > default_arguments;
member names
DEFINITION
std::vector< Symbol > names;