Added scope package

This commit is contained in:
2024-07-20 23:20:23 +02:00
parent 263c0cfb8b
commit 43cdac5572
37 changed files with 416 additions and 371 deletions

@ -23,8 +23,8 @@ func (f *Function) Execute(operation token.Token, register cpu.Register, value *
return f.ExecuteRegisterRegister(operation, register, f.cpu.Output[0])
}
tmp := f.Scope().MustFindFree(f.cpu.General)
defer f.Scope().Free(tmp)
tmp := f.CurrentScope().MustFindFree(f.cpu.General)
defer f.CurrentScope().Free(tmp)
err := f.ExpressionToRegister(value, tmp)