rearrange builtins
This commit is contained in:
17
object/null.go
Normal file
17
object/null.go
Normal file
@@ -0,0 +1,17 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user