This commit is contained in:
2024-05-14 12:10:58 +02:00
parent a9bb79b01c
commit 59911aebb9
645 changed files with 263320 additions and 0 deletions

21
vendor/github.com/glycerine/zygomys/zygo/address.go generated vendored Normal file
View File

@@ -0,0 +1,21 @@
package zygo
type Address struct {
function *SexpFunction
position int
}
func (a Address) IsStackElem() {}
func (stack *Stack) PushAddr(function *SexpFunction, pc int) {
stack.Push(Address{function, pc})
}
func (stack *Stack) PopAddr() (*SexpFunction, int, error) {
elem, err := stack.Pop()
if err != nil {
return MissingFunction, 0, err
}
addr := elem.(Address)
return addr.function, addr.position, nil
}