aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/doc/src/epp.xml
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2011-05-06 15:58:09 +0200
committerHans Bolinder <[email protected]>2011-05-12 08:03:42 +0200
commit229d0d8ca88bc344bed89e46541b325c1d267996 (patch)
tree74fec344df8596c868c36cec5ac08102008cacf3 /lib/stdlib/doc/src/epp.xml
parent68fe6a14539b82250373ef114d6576e74e1b8f2e (diff)
downloadotp-229d0d8ca88bc344bed89e46541b325c1d267996.tar.gz
otp-229d0d8ca88bc344bed89e46541b325c1d267996.tar.bz2
otp-229d0d8ca88bc344bed89e46541b325c1d267996.zip
r
Use Erlang specs and types for documentation
Diffstat (limited to 'lib/stdlib/doc/src/epp.xml')
-rw-r--r--lib/stdlib/doc/src/epp.xml62
1 files changed, 29 insertions, 33 deletions
diff --git a/lib/stdlib/doc/src/epp.xml b/lib/stdlib/doc/src/epp.xml
index e6b48b270a..488499581f 100644
--- a/lib/stdlib/doc/src/epp.xml
+++ b/lib/stdlib/doc/src/epp.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2010</year>
+ <year>1996</year><year>2011</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -38,65 +38,61 @@
by <c>compile</c> to preprocess macros and include files before
the actual parsing takes place.</p>
</description>
+ <datatypes>
+ <datatype>
+ <name name="macros"></name>
+ </datatype>
+ <datatype>
+ <name name="epp_handle"></name>
+ <desc><p>Handle to the epp server.</p></desc>
+ </datatype>
+ </datatypes>
<funcs>
<func>
- <name>open(FileName, IncludePath) -> {ok,Epp} | {error, ErrorDescriptor}</name>
- <name>open(FileName, IncludePath, PredefMacros) -> {ok,Epp} | {error, ErrorDescriptor}</name>
+ <name name="open" arity="2"/>
+ <name name="open" arity="3"/>
<fsummary>Open a file for preprocessing</fsummary>
- <type>
- <v>FileName = atom() | string()</v>
- <v>IncludePath = [DirectoryName]</v>
- <v>DirectoryName = atom() | string()</v>
- <v>PredefMacros = [{atom(),term()}]</v>
- <v>Epp = pid() -- handle to the epp server</v>
- <v>ErrorDescriptor = term()</v>
- </type>
<desc>
<p>Opens a file for preprocessing.</p>
</desc>
</func>
<func>
- <name>close(Epp) -> ok</name>
+ <name name="close" arity="1"/>
<fsummary>Close the preprocessing of the file associated with <c>Epp</c></fsummary>
- <type>
- <v>Epp = pid() -- handle to the epp server</v>
- </type>
<desc>
<p>Closes the preprocessing of a file.</p>
</desc>
</func>
<func>
- <name>parse_erl_form(Epp) -> {ok, AbsForm} | {eof, Line} | {error, ErrorInfo}</name>
+ <name name="parse_erl_form" arity="1"/>
<fsummary>Return the next Erlang form from the opened Erlang source file</fsummary>
- <type>
- <v>Epp = pid()</v>
- <v>AbsForm = term()</v>
- <v>Line = integer()</v>
- <v>ErrorInfo = see separate description below.</v>
- </type>
<desc>
<p>Returns the next Erlang form from the opened Erlang source file.
- The tuple <c>{eof, Line}</c> is returned at end-of-file. The first
+ The tuple <c>{eof, <anno>Line</anno>}</c> is returned at end-of-file. The first
form corresponds to an implicit attribute <c>-file(File,1).</c>, where
<c>File</c> is the name of the file.</p>
</desc>
</func>
<func>
- <name>parse_file(FileName,IncludePath,PredefMacro) -> {ok,[Form]} | {error,OpenError}</name>
- <fsummary>Preprocesse and parse an Erlang source file</fsummary>
- <type>
- <v>FileName = atom() | string()</v>
- <v>IncludePath = [DirectoryName]</v>
- <v>DirectoryName = atom() | string()</v>
- <v>PredefMacros = [{atom(),term()}]</v>
- <v>Form = term() -- same as returned by erl_parse:parse_form</v>
- </type>
+ <name name="parse_file" arity="3"/>
+ <fsummary>Preprocess and parse an Erlang source file</fsummary>
<desc>
<p>Preprocesses and parses an Erlang source file.
- Note that the tuple <c>{eof, Line}</c> returned at end-of-file is
+ Note that the tuple <c>{eof, <anno>Line</anno>}</c> returned at end-of-file is
included as a "form".</p>
</desc>
</func>
+ <func>
+ <name name="format_error" arity="1"/>
+ <fsummary>Format an error descriptor</fsummary>
+ <desc>
+ <p>Takes an <c><anno>ErrorDescriptor</anno></c> and returns
+ a string which
+ describes the error or warning. This function is usually
+ called implicitly when processing an <c>ErrorInfo</c>
+ structure (see below).</p>
+ </desc>
+ </func>
</funcs>
<section>