Files
monkey/object/null.go
Chuck Smith 1c99d2198b
Some checks failed
Build / build (push) Successful in 10m48s
Test / build (push) Failing after 17m11s
Simplified Equality
2024-03-24 17:11:48 -04:00

23 lines
301 B
Go

package object
type Null struct{}
func (n *Null) Type() ObjectType {
return NULL_OBJ
}
func (n *Null) Inspect() string {
return "null"
}
func (n *Null) String() string {
return n.Inspect()
}
func (n *Null) Compare(other Object) int {
if _, ok := other.(*Null); ok {
return 0
}
return 1
}