Authors: : Ulf Wiger (ulf@wiger.net).
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
| main/1 | |
| pp_beam/1 | Reads debug_info from the beam file Beam and returns a string containing the pretty-printed corresponding erlang source code. |
| pp_beam/2 | Reads debug_info from the beam file Beam and pretty-prints it as Erlang source code, storing it in the file Out. |
| pp_src/2 | Pretty-prints the erlang source code corresponding to Forms into Out. |
main(X1::[string()]) -> any()
pp_beam(Beam::filename()) -> string() | {error, Reason}
Reads debug_info from the beam file Beam and returns a string containing the pretty-printed corresponding erlang source code.
pp_beam(Beam::filename(), Out::filename()) -> ok | {error, Reason}
Reads debug_info from the beam file Beam and pretty-prints it as Erlang source code, storing it in the file Out.
pp_src(Forms0::Forms, Out::filename()) -> ok
Pretty-prints the erlang source code corresponding to Forms into Out
Generated by EDoc, Feb 18 2025, 16:31:01.