object

package
Version: v0.0.0-...-0e32bd2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Array

type Array struct {
	Value []Object
}

func (*Array) Push

func (this *Array) Push(obj Object) []Object

func (Array) StringValue

func (this Array) StringValue() string

func (Array) Type

func (this Array) Type() string

type Boolean

type Boolean struct {
	Value bool
}

func (Boolean) StringValue

func (this Boolean) StringValue() string

func (Boolean) Type

func (this Boolean) Type() string

type BuiltinFunction

type BuiltinFunction struct {
	Function  func(args ...Object) Object
	MinParams int
}

func (BuiltinFunction) StringValue

func (this BuiltinFunction) StringValue() string

func (BuiltinFunction) Type

func (this BuiltinFunction) Type() string

type Env

type Env struct {
	Stack map[string]Object
	// contains filtered or unexported fields
}

func InitEnv

func InitEnv() *Env

func (*Env) Clone

func (e *Env) Clone() *Env

func (*Env) Contains

func (e *Env) Contains(str string) bool

func (*Env) Get

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

func (*Env) Set

func (e *Env) Set(str string, obj Object) bool

type Exception

type Exception struct {
	Name    String
	Message String
}

func (Exception) StringValue

func (this Exception) StringValue() string

func (Exception) Type

func (this Exception) Type() string

type Float

type Float struct {
	Value float64
}

func (Float) GenKey

func (this Float) GenKey() Key

func (Float) StringValue

func (this Float) StringValue() string

func (Float) Type

func (this Float) Type() string

type Function

type Function struct {
	Params []ast.Identifier
	Body   ast.Node
	Env    *Env
}

func (Function) StringValue

func (this Function) StringValue() string

func (Function) Type

func (this Function) Type() string

type Integer

type Integer struct {
	Value int64
}

func (Integer) GenKey

func (this Integer) GenKey() Key

func (Integer) StringValue

func (this Integer) StringValue() string

func (Integer) Type

func (this Integer) Type() string

type Key

type Key struct {
	Type  string
	Value Object
}

func (Key) GetValue

func (this Key) GetValue() Object

type Map

type Map struct {
	Value map[Key]Object
}

func (*Map) Get

func (this *Map) Get(key Object) Object

func (*Map) Set

func (this *Map) Set(key Object, value Object) bool

func (Map) StringValue

func (this Map) StringValue() string

func (Map) Type

func (this Map) Type() string

type Mappable

type Mappable interface {
	GenKey() Key
}

type Module

type Module struct {
	Env *Env
}

func (Module) StringValue

func (this Module) StringValue() string

func (Module) Type

func (this Module) Type() string

type Object

type Object interface {
	Type() string
	StringValue() string
}

type String

type String struct {
	Value string
}

func (String) GenKey

func (this String) GenKey() Key

func (String) StringValue

func (this String) StringValue() string

func (String) Type

func (this String) Type() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL