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_anno.xml | 185 +++++++++++++++++++--------------------- 1 file changed, 90 insertions(+), 95 deletions(-) (limited to 'lib/stdlib/doc/src/erl_anno.xml') diff --git a/lib/stdlib/doc/src/erl_anno.xml b/lib/stdlib/doc/src/erl_anno.xml index 9f775943c1..f316f63d98 100644 --- a/lib/stdlib/doc/src/erl_anno.xml +++ b/lib/stdlib/doc/src/erl_anno.xml @@ -35,69 +35,75 @@ erl_anno.xml erl_anno - - - Abstract Datatype for the Annotations of the Erlang Compiler + Abstract datatype for the annotations of the Erlang Compiler. -

This module implements an abstract type that is used by the +

This module provides an abstract type that is used by the Erlang Compiler and its helper modules for holding data such as column, line number, and text. The data type is a collection of annotations as described in the following.

+

The Erlang Token Scanner returns tokens with a subset of the following annotations, depending on the options:

+ column

The column where the token begins.

location

The line and column where the token begins, or - just the line if the column unknown.

-
+ just the line if the column is unknown.

text

The token's text.

-

From the above the following annotation is derived:

+ +

From this, the following annotation is derived:

+ line

The line where the token begins.

-

Furthermore, the following annotations are supported by - this module, and used by various modules:

+ +

This module also supports the following annotations, + which are used by various modules:

+ file

A filename.

generated

A Boolean indicating if the abstract code is - compiler generated. The Erlang Compiler does not emit warnings - for such code.

-
+ compiler-generated. The Erlang Compiler does not emit warnings + for such code.

record

A Boolean indicating if the origin of the abstract - code is a record. Used by Dialyzer to assign types to tuple - elements.

+ code is a record. Used by + Dialyzer + to assign types to tuple elements.

+

The functions - column(), - end_location(), - line(), - location(), and - text() + column(), + end_location(), + line(), + location(), and + text() in the erl_scan module can be used for inspecting annotations in tokens.

+

The functions - map_anno(), - fold_anno(), - mapfold_anno(), - new_anno(), - anno_from_term(), and + anno_from_term(), - anno_to_term() in the erl_parse module can be - used for manipulating annotations in abstract code. -

+ anno_to_term(), + fold_anno(), + map_anno(), + + mapfold_anno(), + and new_anno(), + in the erl_parse module can be + used for manipulating annotations in abstract code.

@@ -118,9 +124,6 @@ - -

To be changed to a non-negative integer in Erlang/OTP 19.0.

-
@@ -133,177 +136,169 @@ - Return the column + Return the column. -

Returns the column of the annotations Anno. -

+

Returns the column of the annotations Anno.

+ - Return the end location of the text + Return the end location of the text.

Returns the end location of the text of the annotations Anno. If there is no text, - undefined is returned. -

+ undefined is returned.

+ - Return the filename + Return the filename.

Returns the filename of the annotations Anno. - If there is no filename, undefined is returned. -

+ If there is no filename, undefined is returned.

+ - Return annotations given a term + Return annotations given a term. -

Returns annotations with the representation Term. -

- -

See also to_term(). -

+

Returns annotations with representation Term.

+

See also to_term().

+ - Return the generated Boolean + Return the generated Boolean. -

Returns true if the annotations Anno - has been marked as generated. The default is to return - false. -

+

Returns true if annotations Anno + is marked as generated. The default is to return + false.

+ - Test for a collection of annotations + Test for a collection of annotations.

Returns true if Term is a collection of - annotations, false otherwise.

+ annotations, otherwise false.

+ - Return the line + Return the line. -

Returns the line of the annotations Anno. -

+

Returns the line of the annotations Anno.

+ - Return the location + Return the location. -

Returns the location of the annotations Anno. -

+

Returns the location of the annotations Anno.

+ - Create a new collection of annotations + Create a new collection of annotations.

Creates a new collection of annotations given a location.

+ - Modify the filename + Modify the filename. -

Modifies the filename of the annotations Anno. -

+

Modifies the filename of the annotations Anno.

+ - Modify the generated marker + Modify the generated marker. -

Modifies the generated marker of the annotations - Anno. +

Modifies the generated marker of the annotations Anno.

+ - Modify the line + Modify the line. -

Modifies the line of the annotations Anno. -

+

Modifies the line of the annotations Anno.

+ - Modify the location + Modify the location. -

Modifies the location of the annotations Anno. -

+

Modifies the location of the annotations Anno.

+ - Modify the record marker + Modify the record marker. -

Modifies the record marker of the annotations Anno. -

+

Modifies the record marker of the annotations Anno.

+ - Modify the text + Modify the text. -

Modifies the text of the annotations Anno. -

+

Modifies the text of the annotations Anno.

+ - Return the text + Return the text.

Returns the text of the annotations Anno. - If there is no text, undefined is returned. -

+ If there is no text, undefined is returned.

+ - Return the term representing a collection of - annotations + Return the term representing a collection of annotations. + -

Returns the term representing the annotations Anno. -

-

See also from_term(). -

+

Returns the term representing the annotations Anno.

+

See also from_term().

+
See Also -

erl_scan(3), - erl_parse(3) -

+

erl_parse(3), + erl_scan(3)

-- cgit v1.2.3