18 lines
275 B
Go
18 lines
275 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) Equal(other Object) bool {
|
|
_, ok := other.(*Null)
|
|
return ok
|
|
}
|