From af761914c9a94a9d54c1bcc2d4fff96a58674078 Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Thu, 9 Jun 2016 13:18:07 +0200 Subject: Remove support for '...' in Maps types It is possible that '...' is added later (OTP 20.0), but for now we are not sure of all details. --- lib/edoc/src/edoc_layout.erl | 16 +++++----------- lib/edoc/src/edoc_parser.yrl | 6 ------ 2 files changed, 5 insertions(+), 17 deletions(-) (limited to 'lib/edoc/src') diff --git a/lib/edoc/src/edoc_layout.erl b/lib/edoc/src/edoc_layout.erl index e86d090b13..ef57b7b084 100644 --- a/lib/edoc/src/edoc_layout.erl +++ b/lib/edoc/src/edoc_layout.erl @@ -901,17 +901,11 @@ t_map(Es) -> t_map_field(#xmlElement{content = [K,V]}=E) -> KElem = t_utype_elem(K), VElem = t_utype_elem(V), - AT = get_attrval(assoc_type, E), - IsAny = fun(["any","()"]) -> true; (_) -> false end, - case AT =:= "assoc" andalso IsAny(KElem) andalso IsAny(VElem) of - true -> "..."; - false -> - AS = case AT of - "assoc" -> " => "; - "exact" -> " := " - end, - KElem ++ [AS] ++ VElem - end. + AS = case get_attrval(assoc_type, E) of + "assoc" -> " => "; + "exact" -> " := " + end, + KElem ++ [AS] ++ VElem. t_record(E, Es) -> Name = ["#"] ++ t_type(get_elem(atom, Es)), diff --git a/lib/edoc/src/edoc_parser.yrl b/lib/edoc/src/edoc_parser.yrl index 983e2f8496..68a3439f10 100644 --- a/lib/edoc/src/edoc_parser.yrl +++ b/lib/edoc/src/edoc_parser.yrl @@ -82,9 +82,6 @@ utype_map_field -> utype '=>' utype : #t_map_field{assoc_type = assoc, utype_map_field -> utype ':=' utype : #t_map_field{assoc_type = exact, k_type = '$1', v_type = '$3'}. -utype_map_field -> '...' : #t_map_field{assoc_type = assoc, - k_type = any(), - v_type = any()}. utype_tuple -> '{' utypes '}' : lists:reverse('$2'). @@ -354,9 +351,6 @@ all_vars([#t_var{} | As]) -> all_vars(As) -> As =:= []. -any() -> - #t_type{name = #t_name{name = any}, args = []}. - %% --------------------------------------------------------------------- %% @doc EDoc type specification parsing. Parses the content of -- cgit v1.2.3