Module etran_util
Authors: Serge Aleynikov (saleyn(at)gmail(dot)com).
Description
Erlang parse transform utility functionsFunction Index
apply_transform/4 | Apply parse transform with debug printing options. |
debug_options/2 | Get parse transforms debug options. |
parse_options/2 | Check if KnownFlags are found in Options. |
process/4 | Call Fun for the AST and optionally print debug info. |
source_forms/2 | Decompile source code from the AST. |
transform/2 | Transform Forms by applying a lambda Fun . |
transform/3 | Transform Forms by applying a lambda Fun . |
Function Details
apply_transform/4
apply_transform(Module, Fun, AST, Options) -> any()
Apply parse transform with debug printing options
debug_options/2
debug_options(Module :: atom(), Options :: list()) ->
#{orig => boolean(),
ast => boolean(),
src => boolean()}
Get parse transforms debug options
parse_options/2
parse_options(KnownFlags :: list(), Options :: list()) ->
[boolean()]
Check if KnownFlags
are found in Options.
process/4
process(Module, Fun, AST, Options) -> any()
Call Fun
for the AST and optionally print debug info
source_forms/2
source_forms(AST :: list(), Options :: list()) -> ok | string()
Decompile source code from the AST
transform/2
transform(Fun :: fun((Forms :: term()) -> tuple() | continue),
Forms :: term()) ->
list()
Transform Forms
by applying a lambda Fun
.
transform/3
transform(Fun ::
fun((Forms :: term(), State :: term()) ->
{tuple() | continue, NewState :: term()}),
Forms :: term(),
State :: term()) ->
{list(), NewState :: term()}
Transform Forms
by applying a lambda Fun
.