Dead code removal

pull/1200/head
Rick Carlino 2020-05-09 15:59:34 -05:00
parent 4a31b34bf4
commit 755cfb6f9e
1 changed files with 1 additions and 31 deletions

View File

@ -30,12 +30,7 @@ defmodule FarmbotCeleryScript.Compiler.Sequence do
iterable_ast,
%{
args:
%{
locals:
%{
body: params
} = locals
} = sequence_args,
%{ locals: %{ body: _ } = locals } = sequence_args,
meta: sequence_meta
} = sequence_ast,
env
@ -43,31 +38,6 @@ defmodule FarmbotCeleryScript.Compiler.Sequence do
sequence_name =
sequence_meta[:sequence_name] || sequence_args[:sequence_name]
# remove the iterable from the parameter applications,
# since it will be injected after this.
_params =
Enum.reduce(params, [], fn
# Remove point_group from parameter appls
%{
kind: :parameter_application,
args: %{data_value: %{kind: :point_group}}
},
acc ->
acc
# Remove every_point from parameter appls
%{
kind: :parameter_application,
args: %{data_value: %{kind: :every_point}}
},
acc ->
acc
# Everything else gets added back
ast, acc ->
acc ++ [ast]
end)
# will be a point_group or every_point node
group_ast = iterable_ast.args.data_value
# check if it's a point_group first, then fall back to every_point