From ee9397bc031dc33e4f735b3331643bbf60a0d17a Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Fri, 16 Jan 2026 12:30:31 +0100 Subject: feat: handle slice expressions --- interp/interpreter.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'interp/interpreter.go') diff --git a/interp/interpreter.go b/interp/interpreter.go index 8d372c3..4faba28 100644 --- a/interp/interpreter.go +++ b/interp/interpreter.go @@ -42,7 +42,8 @@ func (i *Interp) Eval(src string) (res reflect.Value, err error) { i.Push(i.Data[dataOffset:]...) i.PushCode(i.Code[codeOffset:]...) if s, ok := i.Symbols["main"]; ok { - i.PushCode(vm.Instruction{Op: vm.Calli, Arg: []int{int(i.Data[s.Index].Int())}}) + i.PushCode(vm.Instruction{Op: vm.Push, Arg: []int{int(i.Data[s.Index].Int())}}) + i.PushCode(vm.Instruction{Op: vm.Call, Arg: []int{0}}) } i.PushCode(vm.Instruction{Op: vm.Exit}) i.SetIP(max(codeOffset, i.Entry)) -- cgit v1.2.3