importer

Macro importing utilities.

class macro_polo.macros.importer.ImporterMacro

Imports macros from other modules.

This macro expects its parameters to be in one of two forms: 1. module_name 2. macro_name1, macro_name2, ... from module_name

In the first case all macros from the target module will be imported.

Imported macros are added to function_macros, module_macros, and decorator_macros as appropriate.

__init__(function_macros=<factory>, module_macros=<factory>, decorator_macros=<factory>)
Parameters:
Return type:

None

decorator_macros: dict[str, ParameterizedMacro]

Imported decorator macros will be added to this dict.

It may be shared with other macros, such as a DecoratorMacroInvokerMacro.

function_macros: dict[str, Macro]

Imported function macros will be added to this dict.

It may be shared with other macros, such as a FunctionMacroInvokerMacro.

module_macros: dict[str, ParameterizedMacro]

Imported module macros will be added to this dict.

It may be shared with other macros, such as a ModuleMacroInvokerMacro.