aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/examples/erl_id_trans.erl
diff options
context:
space:
mode:
authorMagnus Lång <[email protected]>2016-02-27 18:49:33 +0100
committerHans Bolinder <[email protected]>2016-04-28 16:14:25 +0200
commita07a1d465994427d322c523f26dcabefeb14cf01 (patch)
treedacc413b203de52343b9f18d09ef8529b78d576c /lib/stdlib/examples/erl_id_trans.erl
parentee6a551e593b9788e433f7a99857729acdd5dd53 (diff)
downloadotp-a07a1d465994427d322c523f26dcabefeb14cf01.tar.gz
otp-a07a1d465994427d322c523f26dcabefeb14cf01.tar.bz2
otp-a07a1d465994427d322c523f26dcabefeb14cf01.zip
erl_parse: Add parsing for new map type syntax
erl_types typesets mandatory keys with :=, and uses "..." as a shorthand for "any() => any()". Add these to erl_parse so that all representable types can be written in type-specs.
Diffstat (limited to 'lib/stdlib/examples/erl_id_trans.erl')
-rw-r--r--lib/stdlib/examples/erl_id_trans.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/stdlib/examples/erl_id_trans.erl b/lib/stdlib/examples/erl_id_trans.erl
index c2e345763a..eab2ec4164 100644
--- a/lib/stdlib/examples/erl_id_trans.erl
+++ b/lib/stdlib/examples/erl_id_trans.erl
@@ -671,6 +671,10 @@ map_pair_types([{type,Line,map_field_assoc,[K,V]}|Ps]) ->
K1 = type(K),
V1 = type(V),
[{type,Line,map_field_assoc,[K1,V1]}|map_pair_types(Ps)];
+map_pair_types([{type,Line,map_field_exact,[K,V]}|Ps]) ->
+ K1 = type(K),
+ V1 = type(V),
+ [{type,Line,map_field_exact,[K1,V1]}|map_pair_types(Ps)];
map_pair_types([]) -> [].
field_types([{type,Line,field_type,[{atom,La,A},T]}|Fs]) ->