aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r--lib/stdlib/src/erl_parse.yrl11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/stdlib/src/erl_parse.yrl b/lib/stdlib/src/erl_parse.yrl
index e1ae3b7aea..039cc88b9c 100644
--- a/lib/stdlib/src/erl_parse.yrl
+++ b/lib/stdlib/src/erl_parse.yrl
@@ -753,6 +753,9 @@ attribute_farity({cons,L,H,T}) ->
attribute_farity({tuple,L,Args0}) ->
Args = attribute_farity_list(Args0),
{tuple,L,Args};
+attribute_farity({map,L,Args0}) ->
+ Args = attribute_farity_map(Args0),
+ {map,L,Args};
attribute_farity({op,L,'/',{atom,_,_}=Name,{integer,_,_}=Arity}) ->
{tuple,L,[Name,Arity]};
attribute_farity(Other) -> Other.
@@ -760,6 +763,14 @@ attribute_farity(Other) -> Other.
attribute_farity_list(Args) ->
[attribute_farity(A) || A <- Args].
+attribute_farity_map(Args) ->
+ [attribute_farity_map_field(A) || A <- Args].
+
+attribute_farity_map_field({map_field_assoc,L,K,V}) ->
+ {map_field_assoc,L,attribute_farity(K),attribute_farity(V)};
+attribute_farity_map_field({map_field_exact,L,K,V}) ->
+ {map_field_exact,L,attribute_farity(K),attribute_farity(V)}.
+
-spec error_bad_decl(integer(), attributes()) -> no_return().
error_bad_decl(L, S) ->