object

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NIL_OBJ   = "NIL"
	ERROR_OBJ = "ERROR"

	INTEGER_OBJ = "INTEGER"
	BOOLEAN_OBJ = "BOOLEAN"
	STRING_OBJ  = "STRING"
	HTML_OBJ    = "HTML"

	RETURN_VALUE_OBJ = "RETURN_VALUE"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Env

type Env struct {
	// contains filtered or unexported fields
}

func EnvFromMap

func EnvFromMap(m map[string]interface{}) (*Env, error)

func NewEnv

func NewEnv() *Env

func (*Env) Get

func (e *Env) Get(name string) (Object, bool)

func (*Env) Set

func (e *Env) Set(name string, val Object) Object

type Error

type Error struct {
	Message string
}

func (*Error) String

func (e *Error) String() string

func (*Error) Type

func (e *Error) Type() ObjectType

type Html

type Html struct {
	Value string
}

func (*Html) String

func (h *Html) String() string

func (*Html) Type

func (h *Html) Type() ObjectType

type Integer

type Integer struct {
	Value int64
}

func (*Integer) String

func (i *Integer) String() string

func (*Integer) Type

func (i *Integer) Type() ObjectType

type Nil

type Nil struct{}

func (*Nil) String

func (n *Nil) String() string

func (*Nil) Type

func (n *Nil) Type() ObjectType

type Object

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

type ObjectType

type ObjectType string

type String

type String struct {
	Value string
}

func (*String) String

func (s *String) String() string

func (*String) Type

func (s *String) Type() ObjectType

Jump to

Keyboard shortcuts

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