diff options
author | Björn-Egil Dahlberg <[email protected]> | 2014-07-15 15:04:21 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2014-07-15 15:04:21 +0200 |
commit | 1de92df9be5697f4f6dd9071ecf2ea3530572c1c (patch) | |
tree | 89d97ebb4ac1818643c09664b0f89aa4d0348381 /lib/edoc/src | |
parent | 178e4db9941b2ec79cb75a8e6b1e113c408435d0 (diff) | |
parent | 4373920fb505a7f661b2fc9833a086b19361ab64 (diff) | |
download | otp-1de92df9be5697f4f6dd9071ecf2ea3530572c1c.tar.gz otp-1de92df9be5697f4f6dd9071ecf2ea3530572c1c.tar.bz2 otp-1de92df9be5697f4f6dd9071ecf2ea3530572c1c.zip |
Merge branch 'egil/maps-spec-to-doc-gen/OTP-12058' into maint
* egil/maps-spec-to-doc-gen/OTP-12058:
edoc: More Map tests
edoc: Fix Map type information for docs
erl_docgen: Add 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)], |