From 229d0d8ca88bc344bed89e46541b325c1d267996 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Fri, 6 May 2011 15:58:09 +0200 Subject: r Use Erlang specs and types for documentation --- lib/stdlib/doc/src/epp.xml | 62 ++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 33 deletions(-) (limited to 'lib/stdlib/doc/src/epp.xml') 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 @@
- 19962010 + 19962011 Ericsson AB. All Rights Reserved. @@ -38,65 +38,61 @@ by compile to preprocess macros and include files before the actual parsing takes place.

+ + + + + + +

Handle to the epp server.

+
+
- open(FileName, IncludePath) -> {ok,Epp} | {error, ErrorDescriptor} - open(FileName, IncludePath, PredefMacros) -> {ok,Epp} | {error, ErrorDescriptor} + + Open a file for preprocessing - - FileName = atom() | string() - IncludePath = [DirectoryName] - DirectoryName = atom() | string() - PredefMacros = [{atom(),term()}] - Epp = pid() -- handle to the epp server - ErrorDescriptor = term() -

Opens a file for preprocessing.

- close(Epp) -> ok + Close the preprocessing of the file associated with Epp - - Epp = pid() -- handle to the epp server -

Closes the preprocessing of a file.

- parse_erl_form(Epp) -> {ok, AbsForm} | {eof, Line} | {error, ErrorInfo} + Return the next Erlang form from the opened Erlang source file - - Epp = pid() - AbsForm = term() - Line = integer() - ErrorInfo = see separate description below. -

Returns the next Erlang form from the opened Erlang source file. - The tuple {eof, Line} is returned at end-of-file. The first + The tuple {eof, Line} is returned at end-of-file. The first form corresponds to an implicit attribute -file(File,1)., where File is the name of the file.

- parse_file(FileName,IncludePath,PredefMacro) -> {ok,[Form]} | {error,OpenError} - Preprocesse and parse an Erlang source file - - FileName = atom() | string() - IncludePath = [DirectoryName] - DirectoryName = atom() | string() - PredefMacros = [{atom(),term()}] - Form = term() -- same as returned by erl_parse:parse_form - + + Preprocess and parse an Erlang source file

Preprocesses and parses an Erlang source file. - Note that the tuple {eof, Line} returned at end-of-file is + Note that the tuple {eof, Line} returned at end-of-file is included as a "form".

+ + + Format an error descriptor + +

Takes an ErrorDescriptor and returns + a string which + describes the error or warning. This function is usually + called implicitly when processing an ErrorInfo + structure (see below).

+
+
-- cgit v1.2.3