aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/erl_parse.yrl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2017-01-12 15:38:25 +0100
committerHans Bolinder <[email protected]>2017-01-12 15:38:25 +0100
commite36147a9f7bc7c238416ec9cf4e0fff04e604f1c (patch)
tree4222a975190337d3f3fed60f00e07d1ecfa03182 /lib/stdlib/src/erl_parse.yrl
parentb487a4b703b6e6cefda06d508e4dc192b27281d4 (diff)
parenta2c5a9252ea2dd8382238ea4ec4e0850f4a15167 (diff)
downloadotp-e36147a9f7bc7c238416ec9cf4e0fff04e604f1c.tar.gz
otp-e36147a9f7bc7c238416ec9cf4e0fff04e604f1c.tar.bz2
otp-e36147a9f7bc7c238416ec9cf4e0fff04e604f1c.zip
Merge branch 'maint'
* maint: stdlib: Correct signatures of functions in erl_parse
Diffstat (limited to 'lib/stdlib/src/erl_parse.yrl')
-rw-r--r--lib/stdlib/src/erl_parse.yrl10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/stdlib/src/erl_parse.yrl b/lib/stdlib/src/erl_parse.yrl
index fb5d05ec8e..91d1372a63 100644
--- a/lib/stdlib/src/erl_parse.yrl
+++ b/lib/stdlib/src/erl_parse.yrl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2016. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2017. 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.
@@ -1574,13 +1574,17 @@ new_anno(Term) ->
Abstr :: erl_parse_tree().
anno_to_term(Abstract) ->
- map_anno(fun erl_anno:to_term/1, Abstract).
+ F = fun(Anno, Acc) -> {erl_anno:to_term(Anno), Acc} end,
+ {NewAbstract, []} = modify_anno1(Abstract, [], F),
+ NewAbstract.
-spec anno_from_term(Term) -> erl_parse_tree() when
Term :: term().
anno_from_term(Term) ->
- map_anno(fun erl_anno:from_term/1, Term).
+ F = fun(T, Acc) -> {erl_anno:from_term(T), Acc} end,
+ {NewTerm, []} = modify_anno1(Term, [], F),
+ NewTerm.
%% Forms.
modify_anno1({function,F,A}, Ac, _Mf) ->