diff options
author | Anthony Ramine <[email protected]> | 2014-02-12 02:59:15 +0100 |
---|---|---|
committer | Anthony Ramine <[email protected]> | 2014-02-12 02:59:54 +0100 |
commit | 398eeabee8a4522126aaa56899b9fe81ee884754 (patch) | |
tree | cfb7b583d1a9e67a5fe55c587e6edde3f2022dec /lib/erl_docgen | |
parent | ad8020b105026e388a5266d530977fc14052b036 (diff) | |
download | otp-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.erl | 12 |
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} -> |