Function
INCLUDE FILE
#include "Entity/Function.h"
class Function
Represents a function.
DEFINITION
class Function;
constructor Function
DEFINITION
| Function | ( | const Location & location, | |
| Symbol name, | |||
| std::shared_ptr< Scope > parent_scope, | |||
| const std::shared_ptr< StructuredValue > & definition | ); |
| PARAMETER | DESCRIPTION |
|---|---|
location |
|
name |
|
parent_scope |
|
definition |
constructor Function
DEFINITION
| Function | ( | const Location & location, | |
| Symbol name, | |||
| Visibility visibility, | |||
| std::shared_ptr< Scope > parent_scope, | |||
| bool default_only, | |||
| CallableArguments arguments, | |||
| const Expression & definition | ); |
| PARAMETER | DESCRIPTION |
|---|---|
location |
|
name |
|
visibility |
|
parent_scope |
|
default_only |
|
arguments |
|
definition |
method initializestatic private
DEFINITION
| static void initialize | ( | ); |
method resolve_implementationvirtual protected
Resolve names in the entity.
The default implementation calls resolve() on all sub-body-elements and sub-expressions using traverse().
DEFINITION
| virtual void resolve_implementation | ( | ); |
method serializeconst virtual
DEFINITION
| virtual void serialize | ( | std::ostream & stream | ) const; |
| PARAMETER | DESCRIPTION |
|---|---|
stream |
method traversevirtual protected
Traverse the Entity.
This function is used by the default implementations of resolve_implementation() and expand_calls_implementation(). Unless a subclass overrides both of these methods, it should override traverse().
DEFINITION
| virtual void traverse | ( | std::function< void(Entity &)> entity_callable, | |
| std::function< void(Body &)> body_callable, | |||
| std::function< void(Expression &)> expression_callable | ); |
| PARAMETER | DESCRIPTION |
|---|---|
entity_callable |
|
body_callable |
A callable to apply to each sub-body-element. |
expression_callable |
A callable to apply to each sub-expression. |
member arguments
DEFINITION
CallableArguments arguments;
member definition
DEFINITION
Expression definition;
member initializedstatic private
DEFINITION
static bool initialized;
member token_definitionstatic private
DEFINITION
static Token token_definition;