Skip to content

Macro

INCLUDE FILE
#include "Entity/Macro.h"

class Macro

Represents a macro.

DEFINITION
class Macro;

constructor Macro

DEFINITION
Macro ( const Location & location,
Symbol  name,
std::shared_ptr< Scope >  containing_scope,
const std::shared_ptr< StructuredValue > & definition );
PARAMETERDESCRIPTION
location
name
containing_scope
definition

constructor Macro

DEFINITION
Macro ( const Location & location,
Symbol  name,
Visibility  visibility,
std::shared_ptr< Scope >  containing_scope,
bool  default_only,
CallableArguments  arguments );
PARAMETERDESCRIPTION
location
name
visibility
containing_scope
default_only
arguments

method enter_names

DEFINITION
void  enter_names ( );

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;
PARAMETERDESCRIPTION
stream

method set_arguments

DEFINITION
void  set_arguments ( ScopeBody * expansion,
CloneContext * context,
const std::vector< Expression > & arguments );
PARAMETERDESCRIPTION
expansion
context
arguments

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 );
PARAMETERDESCRIPTION
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 body

DEFINITION
Body  body;

member initializedstatic private

DEFINITION
static bool  initialized;

member token_bodystatic private

DEFINITION
static Token  token_body;