View Source etran_util (etran v0.5.2)

Erlang parse transform utility functions

Link to this section Summary

Functions

Apply parse transform with debug printing options
Get parse transforms debug options
Check if KnownFlags are found in Options.
Call Fun for the AST and optionally print debug info
Decompile source code from the AST
Transform Forms by applying a lambda Fun.
Transform Forms by applying a lambda Fun.

Link to this section Functions

Link to this function

apply_transform(Module, Fun, AST, Options)

View Source
Apply parse transform with debug printing options
Link to this function

debug_options(Module, Options)

View Source
-spec debug_options(atom(), list()) -> #{orig => boolean(), ast => boolean(), src => boolean()}.
Get parse transforms debug options
Link to this function

parse_options(KnownFlags, Options)

View Source
-spec parse_options(list(), list()) -> [boolean()].
Check if KnownFlags are found in Options.
Link to this function

process(Module, Fun, AST, Options)

View Source
Call Fun for the AST and optionally print debug info
Link to this function

source_forms(AST, Options)

View Source
-spec source_forms(list(), list()) -> ok | string().
Decompile source code from the AST
-spec transform(fun((Forms :: term()) -> tuple() | continue), Forms :: term()) -> list().
Transform Forms by applying a lambda Fun.
Link to this function

transform(Fun, Forms, State)

View Source
-spec transform(fun((Forms :: term(), State :: term()) -> {tuple() | continue, NewState :: term()}),
          Forms :: term(),
          State :: term()) ->
             {list(), NewState :: term()}.
Transform Forms by applying a lambda Fun.