anchor.diff:  -module(elixir_exp).
   -export([expand/2, expand_args/2, expand_arg/2, format_error/1]).
  --import(elixir_errors, [compile_error/3, compile_error/4]).
  +-import(elixir_errors, [form_error/4]).
   -include("elixir.hrl").
   
   %% =
  
positive.code:     {context, Ctx} when is_atom(Ctx) and (Ctx /= nil) ->
        Ctx;
      {context, Ctx} ->
        compile_error(Meta, ?m(E, file), "invalid :context for quote, "
          "expected non-nil compile time atom or alias, got: ~ts", ['Elixir.Macro':to_string(Ctx)]);
      false ->
        case ?m(E, module) of
          nil -> 'Elixir';
  
negative.code: %% Quote
  
  expand({Unquote, Meta, [_]}, E) when Unquote == unquote; Unquote == unquote_splicing ->
    form_error(Meta, ?m(E, file), ?MODULE, {unquote_outside_quote, Unquote});
  
  expand({quote, Meta, [Opts]}, E) when is_list(Opts) ->
    case lists:keyfind(do, 1, Opts) of
      {do, Do} ->
        expand({quote, Meta, [lists:keydelete(do, 1, Opts), [{do, Do}]]}, E);
      false ->
        form_error(Meta, ?m(E, file), ?MODULE, missing_do_in_quote)
    end;
  
  expand({quote, Meta, [_]}, E) ->
    form_error(Meta, ?m(E, file), ?MODULE, invalid_args_for_quote);
  
  expand({quote, Meta, [KV, Do]}, E) when is_list(Do) ->
    Exprs =
      case lists:keyfind(do, 1, Do) of
        {do, Expr} -> Expr;
        false -> form_error(Meta, ?m(E, file), ?MODULE, missing_do_in_quote)
      end,
  
    ValidOpts = [context, location, line, file, unquote, bind_quoted, generated],
  