View Source template_compiler_utils (template_compiler v2.8.0)

Misc support routines.

Link to this section Summary

Functions

Return the (universal) modification time of file, 0 on enoent
Set the next "Context" variable name in cs for an enclosed block.
Set the next "Vars" variable name in cs for an enclosed block.
Convert a list or binary to an atom.
Expand escape sequences like \n and \t in a string.
Generate an unique variable name

Link to this section Functions

-spec file_mtime(file:filename_all()) -> calendar:datetime() | 0.
Return the (universal) modification time of file, 0 on enoent
Link to this function

next_context_var(Cs, Ws)

View Source
-spec next_context_var(#cs{}, #ws{}) -> {#cs{}, #ws{}}.
Set the next "Context" variable name in cs for an enclosed block.
-spec next_vars_var(#cs{}, #ws{}) -> {#cs{}, #ws{}}.
Set the next "Vars" variable name in cs for an enclosed block.
-spec pos({file:filename_all(), pos_integer(), pos_integer()}) -> {pos_integer(), pos_integer()}.
-spec set_pos({file:filename_all(), pos_integer(), pos_integer()}, term()) -> term().
-spec to_atom(string() | binary() | atom()) -> atom().
Convert a list or binary to an atom.
Link to this function

unescape_string_literal(String)

View Source
-spec unescape_string_literal(binary()) -> binary().
Expand escape sequences like \n and \t in a string.
-spec var(#ws{}) -> {#ws{}, string()}.
Generate an unique variable name