diff options
Diffstat (limited to 'pkg/interpreter')
-rw-r--r-- | pkg/interpreter/interpreter.go | 4 | ||||
-rw-r--r-- | pkg/interpreter/interpreter_test.go | 2 |
2 files changed, 3 insertions, 3 deletions
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) diff --git a/pkg/interpreter/interpreter_test.go b/pkg/interpreter/interpreter_test.go index ff633a2..73902b2 100644 --- a/pkg/interpreter/interpreter_test.go +++ b/pkg/interpreter/interpreter_test.go @@ -38,7 +38,7 @@ func TestStep(t *testing.T) { if tc.pointer == nil { tc.pointer = pointer.NewPointer() } - NewInterpreter(f, tc.pointer).Step() + NewInterpreter(f, tc.pointer).step() if tc.expectedField != nil { require.Equal(t, tc.expectedField, f) } |