object

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NULL_OBJ         = "NULL"
	ERROR_OBJ        = "ERROR"
	INTEGER_OBJ      = "INTEGER"
	FLOAT_OBJ        = "FLOAT"
	BOOL_OBJ         = "BOOL"
	STRING_OBJ       = "STRING"
	BUILTIN_OBJ      = "BUILTIN"
	RETURN_VALUE_OBJ = "RETURN_VALUE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Boolean

type Boolean struct {
	Value bool
}

func (*Boolean) Inspect

func (o *Boolean) Inspect() string

func (*Boolean) Type

func (o *Boolean) Type() ObjectType

type Builtin

type Builtin struct {
	Fn BuiltinFunc
}

func (*Builtin) Inspect

func (o *Builtin) Inspect() string

func (*Builtin) Type

func (o *Builtin) Type() ObjectType

type BuiltinFunc

type BuiltinFunc func(args ...Object) Object

type Error

type Error struct {
	Message string
}

func (*Error) Inspect

func (o *Error) Inspect() string

func (*Error) Type

func (o *Error) Type() ObjectType

type Float

type Float struct {
	Value float64
}

func (*Float) Inspect

func (o *Float) Inspect() string

func (*Float) Type

func (o *Float) Type() ObjectType

type Integer

type Integer struct {
	Value int64
}

func (*Integer) Inspect

func (o *Integer) Inspect() string

func (*Integer) Type

func (o *Integer) Type() ObjectType

type Null

type Null struct{}

func (*Null) Inspect

func (o *Null) Inspect() string

func (*Null) Type

func (o *Null) Type() ObjectType

type Object

type Object interface {
	Type() ObjectType
	Inspect() string
}

type ObjectType

type ObjectType string

type ReturnValue

type ReturnValue struct {
	Value Object
}

func (*ReturnValue) Inspect

func (o *ReturnValue) Inspect() string

func (*ReturnValue) Type

func (o *ReturnValue) Type() ObjectType

type String

type String struct {
	Value string
}

func (*String) Inspect

func (o *String) Inspect() string

func (*String) Type

func (o *String) Type() ObjectType

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL