etran_util (etran v0.5.3)

View Source

Erlang parse transform utility functions

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.

Functions

apply_transform(Module, Fun, AST, Options)

Apply parse transform with debug printing options

debug_options(Module, Options)

-spec debug_options(atom(), list()) -> #{orig => boolean(), ast => boolean(), src => boolean()}.

Get parse transforms debug options

parse_options(KnownFlags, Options)

-spec parse_options(list(), list()) -> [boolean()].

Check if KnownFlags are found in Options.

process(Module, Fun, AST, Options)

Call Fun for the AST and optionally print debug info

source_forms(AST, Options)

-spec source_forms(list(), list()) -> ok | string().

Decompile source code from the AST

transform(Fun, Forms)

-spec transform(fun((Forms :: term()) -> tuple() | continue), Forms :: term()) -> list().

Transform Forms by applying a lambda Fun.

transform(Fun, Forms, State)

-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.