Skip to content

Commit 8023a58

Browse files
committed
trace import quoted call
1 parent ac76304 commit 8023a58

File tree

5 files changed

+249
-170
lines changed

5 files changed

+249
-170
lines changed

lib/elixir_sense/core/compiler.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ defmodule ElixirSense.Core.Compiler do
361361

362362
{e_prelude, sp, ep} = expand(q_prelude, st, et)
363363
{e_context, sc, ec} = expand(q_context, sp, ep)
364-
quoted = __MODULE__.Quote.quote(exprs, q)
364+
{quoted, sc} = __MODULE__.Quote.quote(exprs, q, sc)
365365
{e_quoted, es, eq} = expand(quoted, sc, ec)
366366

367367
es = es |> State.add_current_env_to_line(meta, eq)

lib/elixir_sense/core/compiler/macro.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,10 @@ defmodule ElixirSense.Core.Compiler.Macro do
191191
defp maybe_escape_map(map) when is_map(map), do: {:%{}, [], Map.to_list(map)}
192192
defp maybe_escape_map(other), do: other
193193

194-
@spec escape(term, keyword) :: Macro.t()
195-
def escape(expr, opts \\ []) do
194+
@spec escape(term, term, keyword) :: Macro.t()
195+
def escape(expr, state, opts \\ []) do
196196
unquote = Keyword.get(opts, :unquote, false)
197197
kind = if Keyword.get(opts, :prune_metadata, false), do: :prune_metadata, else: :none
198-
ElixirSense.Core.Compiler.Quote.escape(expr, kind, unquote)
198+
ElixirSense.Core.Compiler.Quote.escape(expr, kind, unquote, state)
199199
end
200200
end

lib/elixir_sense/core/compiler/map.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ defmodule ElixirSense.Core.Compiler.Map do
1717
keys = [:__struct__ | assoc_keys]
1818
without_keys = Elixir.Map.drop(struct, keys)
1919

20-
struct_assocs =
21-
Compiler.Macro.escape(Enum.sort(Elixir.Map.to_list(without_keys)))
20+
{struct_assocs, se} =
21+
Compiler.Macro.escape(Enum.sort(Elixir.Map.to_list(without_keys)), se)
2222

2323
{{:%, meta, [e_left, {:%{}, map_meta, struct_assocs ++ assocs}]}, se, ee}
2424

0 commit comments

Comments
 (0)