Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 104 lines (44 sloc) 2.417 kB
c0bfe08 generated edown docs + added README
Ulf Wiger authored
1
2
bb57e23 types added in exprecs
Ulf Wiger authored
3 #Module parse_trans_pp#
c0bfe08 generated edown docs + added README
Ulf Wiger authored
4 * [Description](#description)
5 * [Function Index](#index)
6 * [Function Details](#functions)
ca1b670 dialyzer warnings reported by Kostis
Ulf Wiger authored
7
8
c0bfe08 generated edown docs + added README
Ulf Wiger authored
9 Generic parse transform library for Erlang.
049ea9f merged klajo-form-injection
Ulf Wiger authored
10
7ef08c7 re-generated docs with updated edown
Ulf Wiger authored
11
12
bb57e23 types added in exprecs
Ulf Wiger authored
13 __Authors:__ : Ulf Wiger ([`ulf.wiger@erlang-solutions.com`](mailto:ulf.wiger@erlang-solutions.com)).<a name="description"></a>
049ea9f merged klajo-form-injection
Ulf Wiger authored
14
bb57e23 types added in exprecs
Ulf Wiger authored
15 ##Description##
049ea9f merged klajo-form-injection
Ulf Wiger authored
16
c0bfe08 generated edown docs + added README
Ulf Wiger authored
17
049ea9f merged klajo-form-injection
Ulf Wiger authored
18
19
c0bfe08 generated edown docs + added README
Ulf Wiger authored
20 This module contains some useful utility functions for inspecting
049ea9f merged klajo-form-injection
Ulf Wiger authored
21 the results of parse transforms or code generation.
22 The function `main/1` is called from escript, and can be used to
c0bfe08 generated edown docs + added README
Ulf Wiger authored
23 pretty-print debug info in a .beam file from a Linux shell.
049ea9f merged klajo-form-injection
Ulf Wiger authored
24
25 Using e.g. the following bash alias:
c0bfe08 generated edown docs + added README
Ulf Wiger authored
26 <pre>
60299e7 cleanup, type fixes and new rebar
Ulf Wiger authored
27 alias pp='escript $PARSE_TRANS_ROOT/ebin/parse_trans_pp.beam'
28 </pre>
c0bfe08 generated edown docs + added README
Ulf Wiger authored
29
30
31 a file could be pretty-printed using the following command:
32
bb57e23 types added in exprecs
Ulf Wiger authored
33 `$ pp ex_codegen.beam | less`<a name="index"></a>
049ea9f merged klajo-form-injection
Ulf Wiger authored
34
bb57e23 types added in exprecs
Ulf Wiger authored
35 ##Function Index##
049ea9f merged klajo-form-injection
Ulf Wiger authored
36
c0bfe08 generated edown docs + added README
Ulf Wiger authored
37
38 <table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#main-1">main/1</a></td><td></td></tr><tr><td valign="top"><a href="#pp_beam-1">pp_beam/1</a></td><td>
049ea9f merged klajo-form-injection
Ulf Wiger authored
39 Reads debug_info from the beam file Beam and returns a string containing
40 the pretty-printed corresponding erlang source code.</td></tr><tr><td valign="top"><a href="#pp_beam-2">pp_beam/2</a></td><td>
41 Reads debug_info from the beam file Beam and pretty-prints it as
42 Erlang source code, storing it in the file Out.</td></tr><tr><td valign="top"><a href="#pp_src-2">pp_src/2</a></td><td>Pretty-prints the erlang source code corresponding to Forms into Out.</td></tr></table>
43
c0bfe08 generated edown docs + added README
Ulf Wiger authored
44
bb57e23 types added in exprecs
Ulf Wiger authored
45 <a name="functions"></a>
c0bfe08 generated edown docs + added README
Ulf Wiger authored
46
bb57e23 types added in exprecs
Ulf Wiger authored
47 ##Function Details##
c0bfe08 generated edown docs + added README
Ulf Wiger authored
48
49 <a name="main-1"></a>
50
bb57e23 types added in exprecs
Ulf Wiger authored
51 ###main/1##
049ea9f merged klajo-form-injection
Ulf Wiger authored
52
53
54
c0bfe08 generated edown docs + added README
Ulf Wiger authored
55
bb57e23 types added in exprecs
Ulf Wiger authored
56 <pre>main(X1::[string()]) -&gt; any()</pre>
60299e7 cleanup, type fixes and new rebar
Ulf Wiger authored
57 <br></br>
c0bfe08 generated edown docs + added README
Ulf Wiger authored
58
049ea9f merged klajo-form-injection
Ulf Wiger authored
59
c0bfe08 generated edown docs + added README
Ulf Wiger authored
60 <a name="pp_beam-1"></a>
61
bb57e23 types added in exprecs
Ulf Wiger authored
62 ###pp_beam/1##
049ea9f merged klajo-form-injection
Ulf Wiger authored
63
64
c0bfe08 generated edown docs + added README
Ulf Wiger authored
65
66
bb57e23 types added in exprecs
Ulf Wiger authored
67 <pre>pp_beam(Beam::[filename()](#type-filename)) -&gt; string() | {error, Reason}</pre>
60299e7 cleanup, type fixes and new rebar
Ulf Wiger authored
68 <br></br>
c0bfe08 generated edown docs + added README
Ulf Wiger authored
69
70
049ea9f merged klajo-form-injection
Ulf Wiger authored
71
72
c0bfe08 generated edown docs + added README
Ulf Wiger authored
73
60299e7 cleanup, type fixes and new rebar
Ulf Wiger authored
74 Reads debug_info from the beam file Beam and returns a string containing
75 the pretty-printed corresponding erlang source code.<a name="pp_beam-2"></a>
c0bfe08 generated edown docs + added README
Ulf Wiger authored
76
bb57e23 types added in exprecs
Ulf Wiger authored
77 ###pp_beam/2##
049ea9f merged klajo-form-injection
Ulf Wiger authored
78
79
80
c0bfe08 generated edown docs + added README
Ulf Wiger authored
81
bb57e23 types added in exprecs
Ulf Wiger authored
82 <pre>pp_beam(Beam::[filename()](#type-filename), Out::[filename()](#type-filename)) -&gt; ok | {error, Reason}</pre>
60299e7 cleanup, type fixes and new rebar
Ulf Wiger authored
83 <br></br>
c0bfe08 generated edown docs + added README
Ulf Wiger authored
84
85
049ea9f merged klajo-form-injection
Ulf Wiger authored
86
87
c0bfe08 generated edown docs + added README
Ulf Wiger authored
88
60299e7 cleanup, type fixes and new rebar
Ulf Wiger authored
89 Reads debug_info from the beam file Beam and pretty-prints it as
90 Erlang source code, storing it in the file Out.<a name="pp_src-2"></a>
c0bfe08 generated edown docs + added README
Ulf Wiger authored
91
bb57e23 types added in exprecs
Ulf Wiger authored
92 ###pp_src/2##
049ea9f merged klajo-form-injection
Ulf Wiger authored
93
94
95
96
bb57e23 types added in exprecs
Ulf Wiger authored
97 <pre>pp_src(Res::Forms, Out::[filename()](#type-filename)) -&gt; ok</pre>
60299e7 cleanup, type fixes and new rebar
Ulf Wiger authored
98 <br></br>
c0bfe08 generated edown docs + added README
Ulf Wiger authored
99
100
101
049ea9f merged klajo-form-injection
Ulf Wiger authored
102
60299e7 cleanup, type fixes and new rebar
Ulf Wiger authored
103 Pretty-prints the erlang source code corresponding to Forms into Out
Something went wrong with that request. Please try again.