diff options
author | Anthony Ramine <[email protected]> | 2014-02-01 21:47:04 +0100 |
---|---|---|
committer | Anthony Ramine <[email protected]> | 2014-02-01 21:47:04 +0100 |
commit | b2e7b5bdd77f4da3dc05dcbabecec6ca3de1135f (patch) | |
tree | fa3a0d4e94dc135ec40216602f64229b7b622afb /lib/tools/src | |
parent | eec1d22c5aef21ad4606c79465084bbff46d42ee (diff) | |
download | otp-b2e7b5bdd77f4da3dc05dcbabecec6ca3de1135f.tar.gz otp-b2e7b5bdd77f4da3dc05dcbabecec6ca3de1135f.tar.bz2 otp-b2e7b5bdd77f4da3dc05dcbabecec6ca3de1135f.zip |
Support maps in cover
Diffstat (limited to 'lib/tools/src')
-rw-r--r-- | lib/tools/src/cover.erl | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/tools/src/cover.erl b/lib/tools/src/cover.erl index 6aeb251ac2..d77e8bd5b7 100644 --- a/lib/tools/src/cover.erl +++ b/lib/tools/src/cover.erl @@ -1810,6 +1810,25 @@ munge_expr({record_field,Line,ExprL,ExprR}, Vars) -> {MungedExprL, Vars2} = munge_expr(ExprL, Vars), {MungedExprR, Vars3} = munge_expr(ExprR, Vars2), {{record_field,Line,MungedExprL,MungedExprR}, Vars3}; +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), |