aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_docgen
diff options
context:
space:
mode:
authorAnthony Ramine <[email protected]>2014-02-12 02:59:15 +0100
committerAnthony Ramine <[email protected]>2014-02-12 02:59:54 +0100
commit398eeabee8a4522126aaa56899b9fe81ee884754 (patch)
treecfb7b583d1a9e67a5fe55c587e6edde3f2022dec /lib/erl_docgen
parentad8020b105026e388a5266d530977fc14052b036 (diff)
downloadotp-398eeabee8a4522126aaa56899b9fe81ee884754.tar.gz
otp-398eeabee8a4522126aaa56899b9fe81ee884754.tar.bz2
otp-398eeabee8a4522126aaa56899b9fe81ee884754.zip
Handle map types in docgen_edoc_xml_cb
Diffstat (limited to 'lib/erl_docgen')
-rw-r--r--lib/erl_docgen/src/docgen_edoc_xml_cb.erl12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
index c77d739731..e6bf9ce20e 100644
--- a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
+++ b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
@@ -1025,7 +1025,11 @@ t_type([#xmlElement{name = abstype, content = Es}]) ->
t_type([#xmlElement{name = union, content = Es}]) ->
t_union(Es);
t_type([#xmlElement{name = record, content = Es}]) ->
- t_record(Es).
+ t_record(Es);
+t_type([#xmlElement{name = map, content = Es}]) ->
+ t_map(Es);
+t_type([#xmlElement{name = map_field, content = Es}]) ->
+ t_map_field(Es).
t_var(E) ->
[get_attrval(name, E)].
@@ -1063,6 +1067,12 @@ t_record([E|Es]) ->
t_field(#xmlElement{name=field, content=[Atom,Type]}) ->
[get_attrval(value, Atom), "="] ++ t_utype_elem(Type).
+t_map(Es) ->
+ ["#{"] ++ seq(fun t_utype_elem/1, Es, ["}"]).
+
+t_map_field([K,V]) ->
+ [t_utype_elem(K) ++ " => " ++ t_utype_elem(V)].
+
t_abstype(Es) ->
case split_at_colon(t_name(get_elem(erlangName, Es)),[]) of
{Mod,Type} ->