update + repl fixed + bugfixes

This commit is contained in:
Neemek 2026-07-10 21:15:28 +02:00
parent d315a53fbd
commit 828ebb23c0
Signed by: neemek
GPG key ID: 84FFE4D7D40AB25E
10 changed files with 138 additions and 124 deletions

View file

@ -642,7 +642,7 @@ func TestCompile(t *testing.T) {
}
t.Log("Executed bytecode")
CompareStacks(t, testCase.expectedStack, vm.stack)
CompareStacks(t, testCase.expectedStack, vm.Stack)
CompareScope(t, testCase.expectedScope, vm.scope)
})
}
@ -693,8 +693,8 @@ func TestCompiler_CleanStack(t *testing.T) {
}
// make sure stack has only assigned values
for i := 1; i < int(vm.stack.Current); i++ {
v := vm.stack.items[i]
for i := 1; i < int(vm.Stack.Current); i++ {
v := vm.Stack.items[i]
if v == nil || v.Type() != VariableValueType {
t.Errorf("Unclean stack! value %v at %d on the stack is intermediary", v.String(), i)