aboutsummaryrefslogtreecommitdiffstats
path: root/lib/edoc
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-07-11 14:26:46 +0200
committerBjörn-Egil Dahlberg <[email protected]>2014-07-11 15:50:23 +0200
commit989a48f9e16f9348106a7916e65f17773000a18f (patch)
tree9644ec9f5b3a86f75e288d00a636398c260322e8 /lib/edoc
parent12bb46671a2a2835eaa4e6cfa6ddda3923d9f7e1 (diff)
downloadotp-989a48f9e16f9348106a7916e65f17773000a18f.tar.gz
otp-989a48f9e16f9348106a7916e65f17773000a18f.tar.bz2
otp-989a48f9e16f9348106a7916e65f17773000a18f.zip
edoc: Fix Map type information for docs
Diffstat (limited to 'lib/edoc')
-rw-r--r--lib/edoc/src/edoc_layout.erl12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/edoc/src/edoc_layout.erl b/lib/edoc/src/edoc_layout.erl
index e164ff060f..f4e78e8f3a 100644
--- a/lib/edoc/src/edoc_layout.erl
+++ b/lib/edoc/src/edoc_layout.erl
@@ -885,7 +885,7 @@ t_map(Es) ->
["#{"] ++ seq(fun t_utype_elem/1, Es, ["}"]).
t_map_field([K,V]) ->
- [t_utype_elem(K) ++ " => " ++ t_utype_elem(V)].
+ t_utype_elem(K) ++ [" => "] ++ t_utype_elem(V).
t_record(E, Es) ->
Name = ["#"] ++ t_type(get_elem(atom, Es)),
@@ -1082,6 +1082,10 @@ ot_type([#xmlElement{name = nonempty_list, content = Es}]) ->
ot_nonempty_list(Es);
ot_type([#xmlElement{name = tuple, content = Es}]) ->
ot_tuple(Es);
+ot_type([#xmlElement{name = map, content = Es}]) ->
+ ot_map(Es);
+ot_type([#xmlElement{name = map_field, content = Es}]) ->
+ ot_map_field(Es);
ot_type([#xmlElement{name = 'fun', content = Es}]) ->
ot_fun(Es);
ot_type([#xmlElement{name = record, content = Es}]) ->
@@ -1138,6 +1142,12 @@ ot_nonempty_list(Es) ->
ot_tuple(Es) ->
{type,0,tuple,[ot_utype_elem(E) || E <- Es]}.
+ot_map(Es) ->
+ {type,0,map,[ot_utype_elem(E) || E <- Es]}.
+
+ot_map_field(Es) ->
+ {type,0,map_field_assoc,[ot_utype_elem(E) || E <- Es]}.
+
ot_fun(Es) ->
Range = ot_utype(get_elem(type, Es)),
Args = [ot_utype_elem(A) || A <- get_content(argtypes, Es)],