View Source template_compiler_runtime_internal (template_compiler v2.8.0)
Link to this section Summary
Functions
Call the block function, lookup the function in the BlockMap to find the correct module.
Call the block function of the template the current module extends.
Call a module's render function.
Runtime implementation of a forloop.
Include a template.
Echo the HTML escape value within <pre> tags.
Make an unique string (about 11 characters). Used for expanding unique args in templates. The string only consists of the characters A-Z and 0-9 and is safe to use as HTML element id.
Assign variables from a with statement. Care has to be taken for unpacking tuples and lists.
Link to this section Functions
-spec block_call({binary(), integer(), integer()}, atom(), map(), map(), atom(), term()) -> term().
Link to this function
block_inherit(SrcPos, Module, Block, Vars, BlockMap, Runtime, Context)
View Source-spec block_inherit({binary(), integer(), integer()}, atom(), atom(), map(), map(), atom(), term()) ->
term().
-spec call(Module :: atom(), Args :: map(), Vars :: map(), Context :: term()) -> template_compiler:render_result().
Link to this function
forloop(IsForloopVar, ListExpr, LoopVars, LoopBody, EmptyPart, Runtime, IsContextVars, Vars, Context)
View Source-spec forloop(IsForloopVar :: boolean(),
ListExpr :: term(),
LoopVars :: [atom()],
LoopBody :: fun(),
EmptyPart :: fun(),
Runtime :: atom(),
IsContextVars :: boolean(),
Vars :: map(),
Context :: term()) ->
term().
Link to this function
include(SrcPos, Method, Template, Args, Runtime, ContextVars, IsContextVars, Vars, Context)
View Source-spec include({File :: binary(), Line :: integer(), Col :: integer()}, normal | optional | all, template_compiler:template(), [{atom(), term()}], atom(), [binary()], boolean(), map(), term()) -> template_compiler:render_result().
-spec print(term()) -> iolist().
-spec unique() -> binary().
-spec with_vars([atom()], [term()], map()) -> map().