Skip to content

Commit

Permalink
Drop unused tokens var
Browse files Browse the repository at this point in the history
  • Loading branch information
erszcz committed Sep 18, 2022
1 parent 6c5f0e5 commit 163834b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/gradient.ex
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,12 @@ defmodule Gradient do
{:elixir, _} <- wrap_language_name(first_ast) do
asts
|> Enum.map(fn ast ->
ast = put_source_path(ast, opts)
ast =
ast
|> put_source_path(opts)
|> maybe_specify_forms(opts)

tokens = maybe_use_tokens(ast, opts)
ast = maybe_specify_forms(ast, tokens, opts)
opts = [{:env, build_env(tokens)} | opts]

case maybe_gradient_check(ast, opts) ++
Expand Down Expand Up @@ -115,7 +118,7 @@ defmodule Gradient do
end
end

defp maybe_specify_forms(forms, tokens, opts) do
defp maybe_specify_forms(forms, opts) do
unless opts[:no_specify] do
forms
|> put_source_path(opts)
Expand Down

0 comments on commit 163834b

Please sign in to comment.