View Source Surface.MacroComponent behaviour (surface v0.11.4)
A low-level component which is responsible for translating its own content at compile time.
Summary
Callbacks
This function is called to expand a macro component into a set of Surface.AST nodes.
Functions
Evaluates the values of the static properties of a macro component.
Callbacks
@callback expand( attributes :: [Surface.AST.Attribute.t()], content :: binary(), meta :: Surface.AST.Meta.t() ) :: Surface.AST.t() | [Surface.AST.t()]
This function is called to expand a macro component into a set of Surface.AST nodes.
Functions
Evaluates the values of the static properties of a macro component.
Usually called inside translate/2
in order to retrieve the
properties' values at compile-time.