aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/erl_lint.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2015-12-17 12:41:44 +0100
committerHans Bolinder <[email protected]>2016-01-20 10:06:10 +0100
commitb21f71c1bb79d3979505ad6ad1e496472b38c6b9 (patch)
tree66f0d8dfdcf8d2fda2961c9c14f022cf322983c9 /lib/stdlib/src/erl_lint.erl
parentc92ec9ea35209d443c2fb6393a1610f94ffccc1c (diff)
downloadotp-b21f71c1bb79d3979505ad6ad1e496472b38c6b9.tar.gz
otp-b21f71c1bb79d3979505ad6ad1e496472b38c6b9.tar.bz2
otp-b21f71c1bb79d3979505ad6ad1e496472b38c6b9.zip
stdlib: Update erl_parse(3)
Calls to map_anno(), fold_anno(), and mapfold_anno() with lists of erl_parse trees have been replaced. Those functions accept lists of erl_parse trees, but it was not the intention when the functions were introduced, and it is not documented.
Diffstat (limited to 'lib/stdlib/src/erl_lint.erl')
-rw-r--r--lib/stdlib/src/erl_lint.erl5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl
index 4a42754d92..9ef4acdf5f 100644
--- a/lib/stdlib/src/erl_lint.erl
+++ b/lib/stdlib/src/erl_lint.erl
@@ -696,7 +696,12 @@ set_form_file({function,L,N,A,C}, File) ->
set_form_file(Form, _File) ->
Form.
+set_file(Ts, File) when is_list(Ts) ->
+ [anno_set_file(T, File) || T <- Ts];
set_file(T, File) ->
+ anno_set_file(T, File).
+
+anno_set_file(T, File) ->
F = fun(Anno) -> erl_anno:set_file(File, Anno) end,
erl_parse:map_anno(F, T).