aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2016-04-19 09:27:10 +0200
committerBjörn Gustavsson <[email protected]>2016-04-21 12:36:37 +0200
commit679274088e5d9825a629ebfd2ba99049030153ba (patch)
treed7f1173f0ce605959b4731bfb24596384c4656ff
parentd38d5950563429c4a5d6b09550ac1e6f39fb380e (diff)
downloadotp-679274088e5d9825a629ebfd2ba99049030153ba.tar.gz
otp-679274088e5d9825a629ebfd2ba99049030153ba.tar.bz2
otp-679274088e5d9825a629ebfd2ba99049030153ba.zip
cerl: Add missing API function is_c_map_pattern/1
-rw-r--r--lib/compiler/src/cerl.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/compiler/src/cerl.erl b/lib/compiler/src/cerl.erl
index d033050d3c..37ec4e97c9 100644
--- a/lib/compiler/src/cerl.erl
+++ b/lib/compiler/src/cerl.erl
@@ -126,6 +126,7 @@
%% keep map exports here for now
c_map_pattern/1,
is_c_map/1,
+ is_c_map_pattern/1,
map_es/1,
map_arg/1,
update_c_map/3,
@@ -1636,6 +1637,11 @@ is_c_map_empty(#c_map{ es=[] }) -> true;
is_c_map_empty(#c_literal{val=M}) when is_map(M),map_size(M) =:= 0 -> true;
is_c_map_empty(_) -> false.
+-spec is_c_map_pattern(c_map()) -> boolean().
+
+is_c_map_pattern(#c_map{is_pat=IsPat}) ->
+ IsPat.
+
-spec ann_c_map([term()], [c_map_pair()]) -> c_map() | c_literal().
ann_c_map(As, Es) ->