diff options
author | José Valim <jose.valim@plataformatec.com.br> | 2013-12-23 18:23:08 +0100 |
---|---|---|
committer | José Valim <jose.valim@plataformatec.com.br> | 2013-12-23 18:23:08 +0100 |
commit | f81a15b7cb1dbba4d7ef4203fdd4e3ed3a9ddd7d (patch) | |
tree | 70a42b472518c90faaa01899977ec0a50849f1cf /lib/elixir/src/elixir_exp.erl | |
parent | 51aef55c830b770d85c1add1eccd6dcb440fd018 (diff) | |
download | elixir-f81a15b7cb1dbba4d7ef4203fdd4e3ed3a9ddd7d.tar.gz |
Expand fn
Diffstat (limited to 'lib/elixir/src/elixir_exp.erl')
-rw-r--r-- | lib/elixir/src/elixir_exp.erl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/elixir/src/elixir_exp.erl b/lib/elixir/src/elixir_exp.erl index 770d523cb..5d174ed62 100644 --- a/lib/elixir/src/elixir_exp.erl +++ b/lib/elixir/src/elixir_exp.erl @@ -1,5 +1,5 @@ -module(elixir_exp). --export([expand/2]). +-export([expand/2, expand_many/2]). -import(elixir_errors, [compile_error/3, compile_error/4]). -include("elixir.hrl"). @@ -206,7 +206,6 @@ expand({ quote, Meta, [_, _] }, E) -> %% TODO: Remove me. Temporary during refactoring. expand({ '&', _, [Arg] } = Original, E) when is_integer(Arg) -> { Original, E }; - expand({ '&', Meta, [Arg] }, E) -> % assert_no_match_or_guard_scope(Meta, '&', S), case elixir_fn:capture(Meta, Arg, E) of @@ -216,6 +215,10 @@ expand({ '&', Meta, [Arg] }, E) -> expand(Expr, EE) end; +expand({ fn, Meta, Pairs }, E) -> + % assert_no_match_or_guard_scope(Meta, 'fn', S), + elixir_fn:expand(Meta, Pairs, E); + %% Comprehensions expand({ Kind, Meta, Args }, E) when is_list(Args), (Kind == lc) orelse (Kind == bc) -> |