surface v0.1.0-alpha.2 Surface.MacroComponent behaviour View Source

A low-level component which is responsible for translating its own content at compile time.

Link to this section Summary

Functions

Evaluates the values of the properties of a macro component.

Callbacks

Tranlates the content of the macro component.

Link to this section Functions

Link to this function

eval_static_props!(component, attributes, caller)

View Source

Evaluates the values of the properties of a macro component.

Usually called inside translate/2 in order to retrieve the properties at compile-time.

Link to this section Callbacks

Specs

translate(code :: any(), [{:caller, Macro.Env.t()}]) ::
  {open :: iodata(), content :: iodata(), close :: iodata()}

Tranlates the content of the macro component.