Implemented Value interface

This commit is contained in:
2025-02-28 12:15:19 +01:00
parent 31423ccc08
commit b67361c035
36 changed files with 194 additions and 153 deletions

21
src/eval/Register.go Normal file
View File

@ -0,0 +1,21 @@
package eval
import (
"git.urbach.dev/cli/q/src/cpu"
"git.urbach.dev/cli/q/src/types"
)
// Register is a value that is stored inside a CPU register.
type Register struct {
Typ types.Type
Alive uint8
Register cpu.Register
}
func (v Register) String() string {
return "Register"
}
func (v Register) Type() types.Type {
return v.Typ
}