aboutsummaryrefslogtreecommitdiffstats
path: root/lib/edoc/src/edoc_data.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-03-17 12:19:57 +0100
committerMicael Karlberg <[email protected]>2011-03-17 12:19:57 +0100
commit6b1d1ab0a27e9ed08a626e18319beb91d0a0d5ce (patch)
tree82e54daec07390bb4cad8b279e0e8d1fd0170b78 /lib/edoc/src/edoc_data.erl
parent4f42486c2f94860c1aa8152562760b6a2aa7c5cb (diff)
parentf861b4fdb3fd39e35f2951c53a73b30a98c7f973 (diff)
downloadotp-6b1d1ab0a27e9ed08a626e18319beb91d0a0d5ce.tar.gz
otp-6b1d1ab0a27e9ed08a626e18319beb91d0a0d5ce.tar.bz2
otp-6b1d1ab0a27e9ed08a626e18319beb91d0a0d5ce.zip
Merge branch 'dev' into bmk/inets/ftp/missing_spec_causes_dialyxer_problems/OTP-9114
Also fixed a bunch of "end-years" (was 2010 but should have been 2011, which the commit hook not happy with).
Diffstat (limited to 'lib/edoc/src/edoc_data.erl')
-rw-r--r--lib/edoc/src/edoc_data.erl16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/edoc/src/edoc_data.erl b/lib/edoc/src/edoc_data.erl
index 124f8eb9a1..27f43dca5a 100644
--- a/lib/edoc/src/edoc_data.erl
+++ b/lib/edoc/src/edoc_data.erl
@@ -20,7 +20,7 @@
%% @copyright 2003 Richard Carlsson
%% @author Richard Carlsson <[email protected]>
%% @see edoc
-%% @end
+%% @end
%% =====================================================================
%% @doc Building the EDoc external data structure. See the file
@@ -30,9 +30,10 @@
-export([module/4, package/4, overview/4, type/2]).
+-export([hidden_filter/2, get_all_tags/1]).
+
-include("edoc.hrl").
-%% TODO: report multiple definitions of the same type in the same module.
%% TODO: check that variables in @equiv are found in the signature
%% TODO: copy types from target (if missing) when using @equiv
@@ -139,6 +140,15 @@ functions(Es, Env, Opts) ->
|| #entry{name = {_,_}=N, args = As, export = Export, data = Ts}
<- Es].
+hidden_filter(Es, Opts) ->
+ Private = proplists:get_bool(private, Opts),
+ Hidden = proplists:get_bool(hidden, Opts),
+ [E || E <- Es,
+ case E#entry.name of
+ {_, _} -> function_filter(E, Private, Hidden);
+ _ -> true
+ end].
+
function_filter(Es, Opts) ->
Private = proplists:get_bool(private, Opts),
Hidden = proplists:get_bool(hidden, Opts),
@@ -298,7 +308,7 @@ get_deprecated(Ts, F, A, Env) ->
case otp_internal:obsolete(M, F, A) of
{Tag, Text} when Tag =:= deprecated; Tag =:= removed ->
deprecated([Text]);
- {Tag, Repl, _Rel} when Tag =:= deprecated; Tag =:= removed ->
+ {Tag, Repl, _Rel} when Tag =:= deprecated; Tag =:= removed ->
deprecated(Repl, Env);
_ ->
[]