aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-03-04 15:41:46 +0100
committerBjörn-Egil Dahlberg <[email protected]>2014-03-04 15:41:46 +0100
commitc199bd2923e7d733e60beb9bd27b3852cbb2e699 (patch)
treeaae55f1730d4ada826bc49b3439dea0b4739fd30 /lib
parentdb36a1ae51f165f87cd499587af580025701b9cf (diff)
parentb2e7b5bdd77f4da3dc05dcbabecec6ca3de1135f (diff)
downloadotp-c199bd2923e7d733e60beb9bd27b3852cbb2e699.tar.gz
otp-c199bd2923e7d733e60beb9bd27b3852cbb2e699.tar.bz2
otp-c199bd2923e7d733e60beb9bd27b3852cbb2e699.zip
Merge branch 'nox/maps-support-cover/OTP-11764'
* nox/maps-support-cover/OTP-11764: Support maps in cover Conflicts: lib/tools/src/cover.erl
Diffstat (limited to 'lib')
-rw-r--r--lib/tools/src/cover.erl19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/tools/src/cover.erl b/lib/tools/src/cover.erl
index a24d70ed92..113fa24bd5 100644
--- a/lib/tools/src/cover.erl
+++ b/lib/tools/src/cover.erl
@@ -1764,6 +1764,25 @@ munge_expr({record,Line,Arg,Name,Exprs}, Vars) ->
munge_expr({record_field,Line,ExprL,ExprR}, Vars) ->
{MungedExprR, Vars2} = munge_expr(ExprR, Vars),
{{record_field,Line,ExprL,MungedExprR}, Vars2};
+munge_expr({map,Line,Fields}, Vars) ->
+ %% EEP 43
+ {MungedFields, Vars2} = munge_exprs(Fields, Vars, []),
+ {{map,Line,MungedFields}, Vars2};
+munge_expr({map,Line,Arg,Fields}, Vars) ->
+ %% EEP 43
+ {MungedArg, Vars2} = munge_expr(Arg, Vars),
+ {MungedFields, Vars3} = munge_exprs(Fields, Vars2, []),
+ {{map,Line,MungedArg,MungedFields}, Vars3};
+munge_expr({map_field_assoc,Line,Name,Value}, Vars) ->
+ %% EEP 43
+ {MungedName, Vars2} = munge_expr(Name, Vars),
+ {MungedValue, Vars3} = munge_expr(Value, Vars2),
+ {{map_field_assoc,Line,MungedName,MungedValue}, Vars3};
+munge_expr({map_field_exact,Line,Name,Value}, Vars) ->
+ %% EEP 43
+ {MungedName, Vars2} = munge_expr(Name, Vars),
+ {MungedValue, Vars3} = munge_expr(Value, Vars2),
+ {{map_field_exact,Line,MungedName,MungedValue}, Vars3};
munge_expr({cons,Line,ExprH,ExprT}, Vars) ->
{MungedExprH, Vars2} = munge_expr(ExprH, Vars),
{MungedExprT, Vars3} = munge_expr(ExprT, Vars2),