From 198efceb1f14c9822bf87ede6961d0f94a4760db Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Thu, 23 Sep 2021 16:14:37 +0200 Subject: Implemented commands until helloworld works \o/ --- pkg/interpreter/interpreter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/interpreter/interpreter.go') diff --git a/pkg/interpreter/interpreter.go b/pkg/interpreter/interpreter.go index 76917b7..433f264 100644 --- a/pkg/interpreter/interpreter.go +++ b/pkg/interpreter/interpreter.go @@ -16,14 +16,14 @@ func NewInterpreter(f *field.Field, p *pointer.Pointer) *Interpreter { func (i *Interpreter) Run() int { for i.p != nil { - if v := i.Step(); v != nil { + if v := i.step(); v != nil { return *v } } return 0 } -func (i *Interpreter) Step() *int { +func (i *Interpreter) step() *int { var prev *pointer.Pointer = nil for p := i.p; p != nil; p = p.Next { done, v := p.Exec(i.f) -- cgit v1.2.3