aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/doc/src
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-03-21 15:34:18 +0100
committerHans Bolinder <[email protected]>2014-03-25 09:18:02 +0100
commit83b6daef8d52f69c3b583bcc67c0c11fb8dcba0b (patch)
tree8134560fac9ce643b173c9196cf350f01c691a66 /lib/stdlib/doc/src
parenta60a76c7e813eef94e14b377af37e4fc6774ff37 (diff)
downloadotp-83b6daef8d52f69c3b583bcc67c0c11fb8dcba0b.tar.gz
otp-83b6daef8d52f69c3b583bcc67c0c11fb8dcba0b.tar.bz2
otp-83b6daef8d52f69c3b583bcc67c0c11fb8dcba0b.zip
stdlib: Generalize erl_parse:abstract/2
The 'encoding' option of erl_parse:abstract/2 has been extended to include 'none' and a callback function (a predicate). The rationale is that a more general means of determining what integer lists are to be represented as strings may help readability when generating Erlang code given input in some other encoding than Latin-1 or UTF-8.
Diffstat (limited to 'lib/stdlib/doc/src')
-rw-r--r--lib/stdlib/doc/src/erl_parse.xml10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/stdlib/doc/src/erl_parse.xml b/lib/stdlib/doc/src/erl_parse.xml
index 2d5aff3c6c..cf0bff48cd 100644
--- a/lib/stdlib/doc/src/erl_parse.xml
+++ b/lib/stdlib/doc/src/erl_parse.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -173,6 +173,7 @@
</func>
<func>
<name name="abstract" arity="2"/>
+ <type name="encoding_func"/>
<fsummary>Convert an Erlang term into an abstract form</fsummary>
<desc>
<p>Converts the Erlang data structure <c><anno>Data</anno></c> into an
@@ -183,7 +184,12 @@
selecting which integer lists will be considered
as strings. The default is to use the encoding returned by
<seealso marker="epp#default_encoding/0">
- <c>epp:default_encoding/0</c></seealso></p>
+ <c>epp:default_encoding/0</c></seealso>.
+ The value <c>none</c> means that no integer lists will be
+ considered as strings. The <c>encoding_func()</c> will be
+ called with one integer of a list at a time, and if it
+ returns <c>true</c> for every integer the list will be
+ considered a string.</p>
</desc>
</func>
</funcs>