surface v0.1.0-alpha.2 Surface.Translator behaviour View Source
Defines a behaviour that must be implemented by all HTML/Surface node translators.
This module also contains the main logic to translate Surface code.
Link to this section Summary
Functions
Translates a string written using the Surface format into a Phoenix template.
Recursively translates nodes from a parsed surface code.
Link to this section Functions
Specs
run(binary(), integer(), Macro.Env.t(), binary()) :: binary()
Translates a string written using the Surface format into a Phoenix template.
Recursively translates nodes from a parsed surface code.
Link to this section Callbacks
Specs
prepare(nodes :: [any()], [{:caller, Macro.Env.t()}]) :: any()
Specs
translate(node :: any(), [{:caller, Macro.Env.t()}]) :: any()