aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2013-10-01 22:42:18 +0200
committerBjörn-Egil Dahlberg <[email protected]>2014-01-28 15:56:27 +0100
commit758702e24f0780130c6b3058426062a3761b7a6e (patch)
tree65617b8efd72341a39a55571c731ca626e04468c /lib/compiler
parenta0133aa75da3756918a5b9fd427ae75a75ae1dce (diff)
downloadotp-758702e24f0780130c6b3058426062a3761b7a6e.tar.gz
otp-758702e24f0780130c6b3058426062a3761b7a6e.tar.bz2
otp-758702e24f0780130c6b3058426062a3761b7a6e.zip
Update erl_lint, erl_expand_records, sys_pre_expand for Maps
Update erlang lint and syntax expand for #{ K := V }
Diffstat (limited to 'lib/compiler')
-rw-r--r--lib/compiler/src/sys_pre_expand.erl12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/compiler/src/sys_pre_expand.erl b/lib/compiler/src/sys_pre_expand.erl
index 04084d22ff..9998043013 100644
--- a/lib/compiler/src/sys_pre_expand.erl
+++ b/lib/compiler/src/sys_pre_expand.erl
@@ -231,10 +231,10 @@ pattern({tuple,Line,Ps}, St0) ->
pattern({map,Line,Ps}, St0) ->
{TPs,St1} = pattern_list(Ps, St0),
{{map,Line,TPs},St1};
-pattern({map_field,Line,K0,V0}, St0) ->
+pattern({map_field_exact,Line,K0,V0}, St0) ->
{K,St1} = pattern(K0, St0),
{V,St2} = pattern(V0, St1),
- {{map_field,Line,K,V},St2};
+ {{map_field_exact,Line,K,V},St2};
%%pattern({struct,Line,Tag,Ps}, St0) ->
%% {TPs,TPsvs,St1} = pattern_list(Ps, St0),
%% {{tuple,Line,[{atom,Line,Tag}|TPs]},TPsvs,St1};
@@ -334,10 +334,14 @@ expr({map,Line,Es0}, St0) ->
expr({map,Line,Var,Es0}, St0) ->
{Es1,St1} = expr_list(Es0, St0),
{{map,Line,Var,Es1},St1};
-expr({map_field,Line,K0,V0}, St0) ->
+expr({map_field_assoc,Line,K0,V0}, St0) ->
{K,St1} = expr(K0, St0),
{V,St2} = expr(V0, St1),
- {{map_field,Line,K,V},St2};
+ {{map_field_assoc,Line,K,V},St2};
+expr({map_field_exact,Line,K0,V0}, St0) ->
+ {K,St1} = expr(K0, St0),
+ {V,St2} = expr(V0, St1),
+ {{map_field_exact,Line,K,V},St2};
expr({bin,Line,Es0}, St0) ->
{Es1,St1} = expr_bin(Es0, St0),
{{bin,Line,Es1},St1};