aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/shell.erl
diff options
context:
space:
mode:
authorAnthony Ramine <[email protected]>2014-07-01 02:42:49 +0200
committerAnthony Ramine <[email protected]>2014-07-01 02:56:51 +0200
commit8517d458420fcf9381c81337b3e4f232273082e4 (patch)
treeb15589dfc8bf5f163821cb0c9469cfdb3a7fe3ee /lib/stdlib/src/shell.erl
parentc9e36ab16034bb7fe71f772df6bba22070976bbf (diff)
downloadotp-8517d458420fcf9381c81337b3e4f232273082e4.tar.gz
otp-8517d458420fcf9381c81337b3e4f232273082e4.tar.bz2
otp-8517d458420fcf9381c81337b3e4f232273082e4.zip
Expand shell functions in map expressions
Reported-by: Danil Zagoskin
Diffstat (limited to 'lib/stdlib/src/shell.erl')
-rw-r--r--lib/stdlib/src/shell.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/stdlib/src/shell.erl b/lib/stdlib/src/shell.erl
index 3b90542452..679c13f0cf 100644
--- a/lib/stdlib/src/shell.erl
+++ b/lib/stdlib/src/shell.erl
@@ -371,6 +371,14 @@ expand_expr({bc,L,E,Qs}, C) ->
{bc,L,expand_expr(E, C),expand_quals(Qs, C)};
expand_expr({tuple,L,Elts}, C) ->
{tuple,L,expand_exprs(Elts, C)};
+expand_expr({map,L,Es}, C) ->
+ {map,L,expand_exprs(Es, C)};
+expand_expr({map,L,Arg,Es}, C) ->
+ {map,L,expand_expr(Arg, C),expand_exprs(Es, C)};
+expand_expr({map_field_assoc,L,K,V}, C) ->
+ {map_field_assoc,L,expand_expr(K, C),expand_expr(V, C)};
+expand_expr({map_field_exact,L,K,V}, C) ->
+ {map_field_exact,L,expand_expr(K, C),expand_expr(V, C)};
expand_expr({record_index,L,Name,F}, C) ->
{record_index,L,Name,expand_expr(F, C)};
expand_expr({record,L,Name,Is}, C) ->