aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-01-28 11:17:33 +0100
committerBjörn-Egil Dahlberg <[email protected]>2014-01-29 11:08:51 +0100
commit54e921a5944394665acab44b210fdb677b4d15e9 (patch)
tree592613595391e3be0a3445494826835b4921477e
parent8bd7113e5b9c53eb29b7211d43f6d8bc2f58eb81 (diff)
downloadotp-54e921a5944394665acab44b210fdb677b4d15e9.tar.gz
otp-54e921a5944394665acab44b210fdb677b4d15e9.tar.bz2
otp-54e921a5944394665acab44b210fdb677b4d15e9.zip
compiler: Fix core parse for Maps
-rw-r--r--lib/compiler/src/core_parse.yrl2
-rw-r--r--lib/compiler/src/core_scan.erl2
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/compiler/src/core_parse.yrl b/lib/compiler/src/core_parse.yrl
index 67acb0856c..b8db0f683a 100644
--- a/lib/compiler/src/core_parse.yrl
+++ b/lib/compiler/src/core_parse.yrl
@@ -190,7 +190,7 @@ map_pair_patterns -> map_pair_pattern : ['$1'].
map_pair_patterns -> map_pair_pattern ',' map_pair_patterns : ['$1' | '$3'].
map_pair_pattern -> '~' '<' anno_pattern ',' anno_pattern '>' :
- #c_map_pair{op=exact,key='$3',val='$5'}.
+ #c_map_pair{op=#c_literal{val=exact},key='$3',val='$5'}.
cons_pattern -> '[' anno_pattern tail_pattern :
#c_cons{hd='$2',tl='$3'}.
diff --git a/lib/compiler/src/core_scan.erl b/lib/compiler/src/core_scan.erl
index a4fe920258..b7799b373a 100644
--- a/lib/compiler/src/core_scan.erl
+++ b/lib/compiler/src/core_scan.erl
@@ -271,6 +271,8 @@ scan1("->" ++ Cs, Toks, Pos) ->
scan1(Cs, [{'->',Pos}|Toks], Pos);
scan1("-|" ++ Cs, Toks, Pos) ->
scan1(Cs, [{'-|',Pos}|Toks], Pos);
+scan1("::" ++ Cs, Toks, Pos) ->
+ scan1(Cs, [{'::',Pos}|Toks], Pos);
scan1([C|Cs], Toks, Pos) -> %Punctuation character
P = list_to_atom([C]),
scan1(Cs, [{P,Pos}|Toks], Pos);