View Source template_compiler_scanner (template_compiler v3.5.0)

Template language scanner

Summary

Functions

Scan the template string T and return the a token list or an error.

Types

template/0

(since 2007-11-11 by Roberto Saccon, Evan Miller 2008 by Marc Worrell ------------------------------------------------------------------- ------------------------------------------------------------------- Adapted and expanded for Zotonic by Marc Worrell -------------------------------------------------------------------)
-type template() :: string() | binary().

tokens/0

(since 2007-11-11 by Roberto Saccon, Evan Miller 2008 by Marc Worrell ------------------------------------------------------------------- ------------------------------------------------------------------- Adapted and expanded for Zotonic by Marc Worrell -------------------------------------------------------------------)
-type tokens() :: [tuple()].

Functions

scan(Template)

(since 2007-11-11 by Roberto Saccon, Evan Miller 2008 by Marc Worrell ------------------------------------------------------------------- ------------------------------------------------------------------- Adapted and expanded for Zotonic by Marc Worrell -------------------------------------------------------------------)
-spec scan(template()) -> {ok, tokens()} | {error, binary()}.

Scan the template string T and return the a token list or an error.

scan(SourceRef, Template)

(since 2007-11-11 by Roberto Saccon, Evan Miller 2008 by Marc Worrell ------------------------------------------------------------------- ------------------------------------------------------------------- Adapted and expanded for Zotonic by Marc Worrell -------------------------------------------------------------------)