aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_docgen/src/docgen_otp_specs.erl
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2013-10-24 21:17:11 +0200
committerBjörn-Egil Dahlberg <[email protected]>2014-01-28 17:06:41 +0100
commitb42453915e4c6aa1133e88c06a60dfbc5fe5e1f0 (patch)
tree7b551c7584bc56b706a47a1d610e9cb3e176e9f3 /lib/erl_docgen/src/docgen_otp_specs.erl
parent351987be44e11e6eb9e5841adb197ec8e49bc49d (diff)
downloadotp-b42453915e4c6aa1133e88c06a60dfbc5fe5e1f0.tar.gz
otp-b42453915e4c6aa1133e88c06a60dfbc5fe5e1f0.tar.bz2
otp-b42453915e4c6aa1133e88c06a60dfbc5fe5e1f0.zip
edoc,syntax_tools: Teach Map understanding
Diffstat (limited to 'lib/erl_docgen/src/docgen_otp_specs.erl')
-rw-r--r--lib/erl_docgen/src/docgen_otp_specs.erl5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/erl_docgen/src/docgen_otp_specs.erl b/lib/erl_docgen/src/docgen_otp_specs.erl
index 3929e66515..3240edd68e 100644
--- a/lib/erl_docgen/src/docgen_otp_specs.erl
+++ b/lib/erl_docgen/src/docgen_otp_specs.erl
@@ -388,6 +388,8 @@ t_type([#xmlElement{name = nonempty_list, content = Es}]) ->
t_nonempty_list(Es);
t_type([#xmlElement{name = tuple, content = Es}]) ->
t_tuple(Es);
+t_type([#xmlElement{name = map}]) ->
+ t_map();
t_type([#xmlElement{name = 'fun', content = Es}]) ->
["fun("] ++ t_fun(Es) ++ [")"];
t_type([E = #xmlElement{name = record, content = Es}]) ->
@@ -430,6 +432,9 @@ t_nonempty_list(Es) ->
t_tuple(Es) ->
["{"] ++ seq(fun t_utype_elem/1, Es, ["}"]).
+t_map() ->
+ ["#{}"].
+
t_fun(Es) ->
["("] ++ seq(fun t_utype_elem/1, get_content(argtypes, Es),
[") -> "] ++ t_utype(get_elem(type, Es))).