Implemented Value interface
This commit is contained in:
21
src/eval/Register.go
Normal file
21
src/eval/Register.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user