Fix type on if block

pull/974/head
connor rigby 2019-01-29 16:19:10 -08:00 committed by Connor Rigby
parent fbb9d294a8
commit 2b83e76233
No known key found for this signature in database
GPG Key ID: 29A88B24B70456E0
1 changed files with 4 additions and 4 deletions

View File

@ -91,9 +91,9 @@ defmodule Farmbot.CeleryScript.AST.Compiler do
# well, so if that is the case, compile it first.
lhs =
case lhs do
"x" -> {:get_current_x, [], []}
"y" -> {:get_current_y, [], []}
"z" -> {:get_current_z, [], []}
"x" -> quote do: get_current_x()
"y" -> quote do: get_current_y()
"z" -> quote do: get_current_z()
"pin" <> pin -> {:read_pin, [], [String.to_integer(pin), nil]}
%AST{} = ast -> compile(ast, celery_env)
end
@ -110,7 +110,7 @@ defmodule Farmbot.CeleryScript.AST.Compiler do
# read_pin(22, nil) == 5
# The ast will look like: {:==, [], lhs, compile(rhs)}
quote do
unquote(lhs) == unquote(compile(lhs, celery_env))
unquote(lhs) == unquote(compile(rhs, celery_env))
end
"not" ->