diff options
author | Björn-Egil Dahlberg <[email protected]> | 2014-07-11 14:26:46 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2014-07-11 15:50:23 +0200 |
commit | 989a48f9e16f9348106a7916e65f17773000a18f (patch) | |
tree | 9644ec9f5b3a86f75e288d00a636398c260322e8 /lib/edoc/src | |
parent | 12bb46671a2a2835eaa4e6cfa6ddda3923d9f7e1 (diff) | |
download | otp-989a48f9e16f9348106a7916e65f17773000a18f.tar.gz otp-989a48f9e16f9348106a7916e65f17773000a18f.tar.bz2 otp-989a48f9e16f9348106a7916e65f17773000a18f.zip |
edoc: Fix Map type information for docs
Diffstat (limited to 'lib/edoc/src')
-rw-r--r-- | lib/edoc/src/edoc_layout.erl | 12 |
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)], |