View Source parse_trans_pp (parse_trans v3.4.2)
Generic parse transform library for Erlang.
This module contains some useful utility functions for inspecting the results of parse transforms or code generation. The function main/1
is called from escript, and can be used to pretty-print debug info in a .beam file from a Linux shell.
alias pp='escript $PARSE_TRANS_ROOT/ebin/parse_trans_pp.beam'
a file could be pretty-printed using the following command:
$ pp ex_codegen.beam | less
Summary
Functions
Reads debug_info from the beam file Beam and returns a string containing the pretty-printed corresponding erlang source code.
Reads debug_info from the beam file Beam and pretty-prints it as Erlang source code, storing it in the file Out.
Pretty-prints the erlang source code corresponding to Forms into Out
Functions
-spec main([string()]) -> any().
-spec pp_beam(file:filename()) -> ok | {error, any()}.
-spec pp_beam(file:filename(), file:filename()) -> ok | {error, any()}.
-spec pp_src(parse_trans:forms(), file:filename()) -> ok.