From 68d53c01b0b8e9a007a6a30158c19e34b2d2a34e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 18 May 2016 15:53:35 +0200 Subject: Update STDLIB documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Language cleaned up by the technical writers xsipewe and tmanevik from Combitech. Proofreading and corrections by Björn Gustavsson and Hans Bolinder. --- lib/stdlib/doc/src/erl_pp.xml | 129 ++++++++++++++++++++++-------------------- 1 file changed, 69 insertions(+), 60 deletions(-) (limited to 'lib/stdlib/doc/src/erl_pp.xml') diff --git a/lib/stdlib/doc/src/erl_pp.xml b/lib/stdlib/doc/src/erl_pp.xml index e96fd576ec..77a7f1e8d1 100644 --- a/lib/stdlib/doc/src/erl_pp.xml +++ b/lib/stdlib/doc/src/erl_pp.xml @@ -7,7 +7,7 @@ 1996 2016 Ericsson AB, All Rights Reserved - + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -30,38 +30,37 @@ 1 Bjarne Däcker - 97-01-24 + 1997-01-24 B - erl_pp.sgml + erl_pp.xml erl_pp - The Erlang Pretty Printer + The Erlang pretty printer.

The functions in this module are used to generate aesthetically attractive representations of abstract - forms, which are suitable for printing. All functions return (possibly deep) + forms, which are suitable for printing. + All functions return (possibly deep) lists of characters and generate an error if the form is wrong.

-

All functions can have an optional argument which specifies a hook + +

All functions can have an optional argument, which specifies a hook that is called if an attempt is made to print an unknown form.

+ -

The optional argument - HookFunction, shown in the functions described below, - defines a function which is called when an unknown form occurs where there - should be a valid expression.

- -

If HookFunction is equal to none there is no hook - function.

- -

The called hook function should return a (possibly deep) list - of characters. expr/4 - is useful in a hook. -

-

If CurrentIndentation is negative, there will be no line - breaks and only a space is used as a separator.

+

Optional argument HookFunction, + shown in the functions described in this module, defines a function + that is called when an unknown form occurs where there + is to be a valid expression. If HookFunction is equal to + none, there is no hook function.

+

The called hook function is to return a (possibly deep) list of + characters. Function expr/4 + is useful in a hook.

+

If CurrentIndentation is negative, there are no + line breaks and only a space is used as a separator.

@@ -71,78 +70,88 @@
+ - - - Pretty print a form + + + Pretty print an attribute. -

Pretty prints a - Form which is an abstract form of a type which is - returned by - erl_parse:parse_form/1.

+

Same as form/1,2, + but only for attribute Attribute.

+ - - - Pretty print an attribute + + + + + Pretty print one Expression. -

The same as form, but only for the attribute - Attribute.

+

Prints one expression. It is useful for implementing hooks (see + section + Known Limitations).

+ - - - Pretty print a function + + + + Pretty print Expressions. -

The same as form, but only for the function - Function.

+

Same as form/1,2, + but only for the sequence of + expressions in Expressions.

+ - - - Pretty print a guard + + + Pretty print a form. -

The same as form, but only for the guard test - Guard.

+

Pretty prints a + Form, which is an abstract form of a type that is + returned by + erl_parse:parse_form/1.

+ - - - - Pretty print Expressions + + + Pretty print a function. -

The same as form, but only for the sequence of - expressions in Expressions.

+

Same as form/1,2, + but only for function Function.

+ - - - - - Pretty print one Expression + + + Pretty print a guard. -

This function prints one expression. It is useful for implementing hooks (see below).

+

Same as form/1,2, + but only for the guard test Guard.

- Bugs -

It should be possible to have hook functions for unknown forms - at places other than expressions.

+ + Known Limitations +

It is not possible to have hook functions for unknown forms + at other places than expressions.

See Also -

io(3), - erl_parse(3), - erl_eval(3)

+

erl_eval(3), + erl_parse(3), + io(3)

-- cgit v1.2.3