From d9daff6d87c217ba7d3cba00642710e473e9b226 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Fri, 26 Jun 2015 14:09:43 +0200 Subject: stdlib: Remove deprecated functions in erl_parse and erl_scan The recently added module erl_anno can no longer handle negative line numbers. --- lib/stdlib/doc/src/erl_scan.xml | 185 ++-------------------------------------- 1 file changed, 6 insertions(+), 179 deletions(-) (limited to 'lib/stdlib/doc/src/erl_scan.xml') diff --git a/lib/stdlib/doc/src/erl_scan.xml b/lib/stdlib/doc/src/erl_scan.xml index 18e988e286..01b845a039 100644 --- a/lib/stdlib/doc/src/erl_scan.xml +++ b/lib/stdlib/doc/src/erl_scan.xml @@ -39,39 +39,15 @@ Erlang tokens.

- - - - - - - - - - - - - - - - - - - - - - - - @@ -87,9 +63,6 @@ - - - @@ -122,25 +95,23 @@ StartLocation, []).

StartLocation indicates the initial location when scanning starts. If StartLocation is a line, - attributes() as well as EndLocation and + Anno as well as EndLocation and ErrorLocation will be lines. If StartLocation is a pair of a line and a column - attributes() takes the form of an opaque compound + Anno takes the form of an opaque compound data type, and EndLocation and ErrorLocation will be pairs of a line and a column. The token - attributes contain information about the column and the + annotations contain information about the column and the line where the token begins, as well as the text of the token (if the text option is given), all of which can - be accessed by calling token_info/1,2, attributes_info/1,2, + be accessed by calling column/1, line/1, location/1, and text/1.

A token is a tuple containing information about - syntactic category, the token attributes, and the actual + syntactic category, the token annotations, and the actual terminal symbol. For punctuation characters (e.g. ;, |) and reserved words, the category and the symbol coincide, and the token is represented by a two-tuple. @@ -172,7 +143,7 @@

Short for [return_comments, return_white_spaces].

text -

Include the token's text in the token attributes. The +

Include the token's text in the token annotation. The text is the part of the input corresponding to the token.

@@ -305,150 +276,6 @@

- - - Return information about a token - -

Returns a list containing information about the token - Token. The order of the - TokenInfoTuples is not - defined. See token_info/2 for - information about specific - TokenInfoTuples.

-

Note that if token_info(Token, TokenItem) returns - undefined for some TokenItem, the - item is not included in TokenInfo.

-
-
- - - - - - Return information about a token - -

Returns a list containing information about the token - Token. If one single - TokenItem is given the returned value is - the corresponding - TokenInfoTuple, or undefined if the - TokenItem has no value. If a list of - TokenItems is given the result is a list of - TokenInfoTuple. The - TokenInfoTuples will - appear with the corresponding TokenItems in - the same order as the TokenItems - appear in the list of TokenItems. - TokenItems with no value are not included - in the list of TokenInfoTuple.

-

The following TokenInfoTuples with corresponding - TokenItems are valid:

- - {category, - category()} -

The category of the token.

-
- {column, - column()} -

The column where the token begins.

-
- {length, integer() > 0} -

The length of the token's text.

-
- {line, - line()} -

The line where the token begins.

-
- {location, - location()} -

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

-
- {symbol, - symbol()} -

The token's symbol.

-
- {text, string()} -

The token's text.

-
-
-
-
- - - Return information about token attributes - -

Returns a list containing information about the token - attributes Attributes. The order of the - AttributeInfoTuples is not defined. - See attributes_info/2 for - information about specific - AttributeInfoTuples.

-

Note that if attributes_info(Token, AttributeItem) - returns undefined for some AttributeItem in - the list above, the item is not included in - AttributesInfo.

-
-
- - - - Return information about a token attributes - - -

Returns a list containing information about the token - attributes Attributes. If one single - AttributeItem is given the returned value is the - corresponding AttributeInfoTuple, - or undefined if the AttributeItem - has no value. If a list of AttributeItem - is given the result is a list of - AttributeInfoTuple. - The AttributeInfoTuples - will appear with the corresponding AttributeItems - in the same order as the AttributeItems - appear in the list of AttributeItems. - AttributeItems with no - value are not included in the list of - AttributeInfoTuple.

-

The following AttributeInfoTuples with - corresponding AttributeItems are valid:

- - {column, - column()} -

The column where the token begins.

-
- {length, integer() > 0} -

The length of the token's text.

-
- {line, - line()} -

The line where the token begins.

-
- {location, - location()} -

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

-
- {text, string()} -

The token's text.

-
-
-
-
- - - Set a token attribute value - -

Sets the value of the line attribute of the token - attributes Attributes.

-

The SetAttributeFun is called with the value of - the line attribute, and is to return the new value of - the line attribute.

-
-
Format an error descriptor -- cgit v1.2.3