diff options
author | Björn Gustavsson <[email protected]> | 2018-04-04 14:10:21 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2018-04-04 14:10:21 +0200 |
commit | db1447e1423aaaafa02d52ca0b57115631990780 (patch) | |
tree | afa43c1de02f6156535ce991470db9af648bc4d5 /lib/stdlib/src/erl_parse.yrl | |
parent | f99860259ee557851acc865519a315f04d1d4d51 (diff) | |
parent | 63e1c58d27ab695a19897423fc75e607f69ff51b (diff) | |
download | otp-db1447e1423aaaafa02d52ca0b57115631990780.tar.gz otp-db1447e1423aaaafa02d52ca0b57115631990780.tar.bz2 otp-db1447e1423aaaafa02d52ca0b57115631990780.zip |
Merge pull request #1725 from michalmuskala/fun-literals
Compile external fun expressions to literals
OTP-15003
Diffstat (limited to 'lib/stdlib/src/erl_parse.yrl')
-rw-r--r-- | lib/stdlib/src/erl_parse.yrl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/stdlib/src/erl_parse.yrl b/lib/stdlib/src/erl_parse.yrl index 14ca24362e..0c338b5952 100644 --- a/lib/stdlib/src/erl_parse.yrl +++ b/lib/stdlib/src/erl_parse.yrl @@ -1377,6 +1377,8 @@ normalise({map,_,Pairs}=M) -> ({map_field_assoc,_,K,V}) -> {normalise(K),normalise(V)}; (_) -> erlang:error({badarg,M}) end, Pairs)); +normalise({'fun',_,{function,{atom,_,M},{atom,_,F},{integer,_,A}}}) -> + fun M:F/A; %% Special case for unary +/-. normalise({op,_,'+',{char,_,I}}) -> I; normalise({op,_,'+',{integer,_,I}}) -> I; |