Nope
This commit is contained in:
parent
54d4fb0f73
commit
1d04c3ed71
|
@ -5,15 +5,15 @@ defmodule Farmbot.CeleryScript.VirtualMachine do
|
|||
alias AST.Compiler
|
||||
alias Farmbot.CeleryScript.VirtualMachine.{InstructionSet, RuntimeError}
|
||||
|
||||
use GenServer
|
||||
defmodule State do
|
||||
@moduledoc false
|
||||
|
||||
defstruct instruction_set: struct(InstructionSet)
|
||||
end
|
||||
|
||||
def execute(ast, state \\ %State{})
|
||||
# alias Farmbot.CeleryScript.VirtualMachine, as: VM
|
||||
# Farmbot.HTTP.get!("/api/sequences/2").body |> Poison.decode! |> Farmbot.CeleryScript.AST.parse
|
||||
def execute(%AST{} = ast, state \\ struct(State)) do
|
||||
|
||||
def execute(%AST{} = ast, state) do
|
||||
ast |> Compiler.compile(state.instruction_set)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue