Inline binaries inside interpolation

This commit is contained in:
José Valim
2017-03-05 18:10:11 +01:00
parent cd1f0ca12a
commit 62055875ba
2 changed files with 17 additions and 5 deletions
+5
View File
@@ -56,6 +56,11 @@ expr_type(_) -> default.
%% Expands the expression of a bitstring, that is, the LHS of :: or
%% an argument of the bitstring (such as "foo" in "<<foo>>").
expand_expr(Meta, {{'.', M1, ['Elixir.Kernel', to_string]}, M2, [Arg]}, Fun, E) ->
case expand_expr(Meta, Arg, Fun, E) of
{Bin, _} = Pair when is_binary(Bin) -> Pair;
{EArg, EE} -> {{{'.', M1, ['Elixir.Kernel', to_string]}, M2, [EArg]}, EE}
end;
expand_expr(Meta, Component, Fun, E) ->
case Fun(Component, E) of
{EComponent, _} when is_list(EComponent); is_atom(EComponent) ->