value

package
v0.0.0-...-efe1987 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStaticString

func NewStaticString(v string) core.Value

Types

type Array

type Array struct {
	Object
	// contains filtered or unexported fields
}

func (*Array) Access

func (o *Array) Access(vm core.VM, index core.Value, mode core.Opcode) (core.Value, error)

func (*Array) Append

func (o *Array) Append(vals ...core.Value)

func (*Array) AsBool

func (o *Array) AsBool() (bool, bool)

func (*Array) AsBytes

func (o *Array) AsBytes() ([]byte, bool)

func (*Array) AsString

func (o *Array) AsString() (string, bool)

func (*Array) Assign

func (o *Array) Assign(index, value core.Value) (err error)

func (*Array) At

func (o *Array) At(i int) core.Value

func (*Array) BinaryOp

func (o *Array) BinaryOp(vm core.VM, op token.Token, rhs core.Value) (core.Value, error)

func (*Array) Copy

func (o *Array) Copy(alloc core.Allocator) core.Value

func (*Array) Equals

func (o *Array) Equals(x core.Value) bool

func (*Array) GobDecode

func (o *Array) GobDecode(b []byte) error

func (*Array) GobEncode

func (o *Array) GobEncode() ([]byte, error)

func (*Array) Interface

func (o *Array) Interface() any

func (*Array) IsArray

func (o *Array) IsArray() bool

func (*Array) IsEmpty

func (o *Array) IsEmpty() bool

func (*Array) IsFalse

func (o *Array) IsFalse() bool

func (*Array) IsImmutable

func (o *Array) IsImmutable() bool

func (*Array) IsIterable

func (o *Array) IsIterable() bool

func (*Array) IsTrue

func (o *Array) IsTrue() bool

func (*Array) Iterate

func (o *Array) Iterate(alloc core.Allocator) core.Iterator

func (*Array) Len

func (o *Array) Len() int

func (*Array) Method

func (o *Array) Method(vm core.VM, name string, args []core.Value) (core.Value, error)

func (*Array) Set

func (o *Array) Set(val []core.Value, immutable bool)

func (*Array) SetAt

func (o *Array) SetAt(i int, val core.Value)

func (*Array) Slice

func (o *Array) Slice(s, e int) []core.Value

func (*Array) String

func (o *Array) String() string

func (*Array) TypeName

func (o *Array) TypeName() string

func (*Array) Value

func (o *Array) Value() []core.Value

type Bytes

type Bytes struct {
	Object
	// contains filtered or unexported fields
}

func (*Bytes) Access

func (o *Bytes) Access(vm core.VM, index core.Value, mode core.Opcode) (core.Value, error)

func (*Bytes) Append

func (o *Bytes) Append(v []byte)

func (*Bytes) AsBool

func (o *Bytes) AsBool() (bool, bool)

func (*Bytes) AsBytes

func (o *Bytes) AsBytes() ([]byte, bool)

func (*Bytes) AsString

func (o *Bytes) AsString() (string, bool)

func (*Bytes) Assign

func (o *Bytes) Assign(core.Value, core.Value) error

func (*Bytes) At

func (o *Bytes) At(i int) byte

func (*Bytes) BinaryOp

func (o *Bytes) BinaryOp(vm core.VM, op token.Token, rhs core.Value) (core.Value, error)

func (*Bytes) Clear

func (o *Bytes) Clear()

func (*Bytes) Copy

func (o *Bytes) Copy(alloc core.Allocator) core.Value

func (*Bytes) Equals

func (o *Bytes) Equals(x core.Value) bool

func (*Bytes) GobDecode

func (o *Bytes) GobDecode(b []byte) error

func (*Bytes) GobEncode

func (o *Bytes) GobEncode() ([]byte, error)

func (*Bytes) Interface

func (o *Bytes) Interface() any

func (*Bytes) IsBytes

func (o *Bytes) IsBytes() bool

func (*Bytes) IsEmpty

func (o *Bytes) IsEmpty() bool

func (*Bytes) IsFalse

func (o *Bytes) IsFalse() bool

func (*Bytes) IsIterable

func (o *Bytes) IsIterable() bool

func (*Bytes) IsTrue

func (o *Bytes) IsTrue() bool

func (*Bytes) Iterate

func (o *Bytes) Iterate(alloc core.Allocator) core.Iterator

func (*Bytes) Len

func (o *Bytes) Len() int

func (*Bytes) Method

func (o *Bytes) Method(vm core.VM, name string, args []core.Value) (core.Value, error)

func (*Bytes) Set

func (o *Bytes) Set(v []byte)

func (*Bytes) Slice

func (o *Bytes) Slice(start, end int) []byte

func (*Bytes) String

func (o *Bytes) String() string

func (*Bytes) TypeName

func (o *Bytes) TypeName() string

func (*Bytes) Value

func (o *Bytes) Value() []byte

type Error

type Error struct {
	Object
	// contains filtered or unexported fields
}

func (*Error) Access

func (o *Error) Access(vm core.VM, index core.Value, mode core.Opcode) (core.Value, error)

func (*Error) AsBool

func (o *Error) AsBool() (bool, bool)

func (*Error) AsString

func (o *Error) AsString() (string, bool)

func (*Error) Assign

func (o *Error) Assign(core.Value, core.Value) error

func (*Error) BinaryOp

func (o *Error) BinaryOp(vm core.VM, op token.Token, rhs core.Value) (core.Value, error)

func (*Error) Copy

func (o *Error) Copy(alloc core.Allocator) core.Value

func (*Error) Equals

func (o *Error) Equals(x core.Value) bool

func (*Error) GobDecode

func (o *Error) GobDecode(b []byte) error

func (*Error) GobEncode

func (o *Error) GobEncode() ([]byte, error)

func (*Error) Interface

func (o *Error) Interface() any

func (*Error) IsError

func (o *Error) IsError() bool

func (*Error) IsFalse

func (o *Error) IsFalse() bool

func (*Error) IsTrue

func (o *Error) IsTrue() bool

func (*Error) Method

func (o *Error) Method(vm core.VM, name string, args []core.Value) (core.Value, error)

func (*Error) Set

func (o *Error) Set(value core.Value)

func (*Error) String

func (o *Error) String() string

func (*Error) TypeName

func (o *Error) TypeName() string

func (*Error) Value

func (o *Error) Value() core.Value

type Map

type Map struct {
	Object
	// contains filtered or unexported fields
}

func (*Map) Access

func (o *Map) Access(vm core.VM, index core.Value, mode core.Opcode) (core.Value, error)

func (*Map) AsBool

func (o *Map) AsBool() (bool, bool)

func (*Map) AsString

func (o *Map) AsString() (string, bool)

func (*Map) Assign

func (o *Map) Assign(index, value core.Value) error

func (*Map) BinaryOp

func (o *Map) BinaryOp(vm core.VM, op token.Token, rhs core.Value) (core.Value, error)

func (*Map) Copy

func (o *Map) Copy(alloc core.Allocator) core.Value

func (*Map) Delete

func (o *Map) Delete(key string)

func (*Map) Equals

func (o *Map) Equals(x core.Value) bool

func (*Map) Get

func (o *Map) Get(key string) (core.Value, bool)

func (*Map) GobDecode

func (o *Map) GobDecode(b []byte) error

func (*Map) GobEncode

func (o *Map) GobEncode() ([]byte, error)

func (*Map) Has

func (o *Map) Has(key string) bool

func (*Map) Interface

func (o *Map) Interface() any

func (*Map) IsEmpty

func (o *Map) IsEmpty() bool

func (*Map) IsFalse

func (o *Map) IsFalse() bool

func (*Map) IsImmutable

func (o *Map) IsImmutable() bool

func (*Map) IsIterable

func (o *Map) IsIterable() bool

func (*Map) IsMap

func (o *Map) IsMap() bool

func (*Map) IsTrue

func (o *Map) IsTrue() bool

func (*Map) Iterate

func (o *Map) Iterate(alloc core.Allocator) core.Iterator

func (*Map) Keys

func (o *Map) Keys() []string

func (*Map) Len

func (o *Map) Len() int

func (*Map) Method

func (o *Map) Method(vm core.VM, name string, args []core.Value) (core.Value, error)

func (*Map) Set

func (o *Map) Set(val map[string]core.Value, immutable bool)

func (*Map) SetKey

func (o *Map) SetKey(key string, val core.Value)

func (*Map) String

func (o *Map) String() string

func (*Map) TypeName

func (o *Map) TypeName() string

func (*Map) Value

func (o *Map) Value() map[string]core.Value

type Object

type Object struct {
}

func (*Object) Access

func (o *Object) Access(core.VM, core.Value, core.Opcode) (core.Value, error)

func (*Object) Arity

func (o *Object) Arity() int

func (*Object) AsBool

func (o *Object) AsBool() (bool, bool)

func (*Object) AsBytes

func (o *Object) AsBytes() ([]byte, bool)

func (*Object) AsChar

func (o *Object) AsChar() (rune, bool)

func (*Object) AsFloat

func (o *Object) AsFloat() (float64, bool)

func (*Object) AsInt

func (o *Object) AsInt() (int64, bool)

func (*Object) AsString

func (o *Object) AsString() (string, bool)

func (*Object) AsTime

func (o *Object) AsTime() (time.Time, bool)

func (*Object) Assign

func (o *Object) Assign(core.Value, core.Value) error

func (*Object) BinaryOp

func (o *Object) BinaryOp(vm core.VM, op token.Token, rhs core.Value) (core.Value, error)

func (*Object) Call

func (o *Object) Call(core.VM, []core.Value) (core.Value, error)

func (*Object) Copy

func (o *Object) Copy(core.Allocator) core.Value

func (*Object) Equals

func (o *Object) Equals(x core.Value) bool

func (*Object) Interface

func (o *Object) Interface() any

func (*Object) IsArray

func (o *Object) IsArray() bool

func (*Object) IsBool

func (o *Object) IsBool() bool

func (*Object) IsBuiltinFunction

func (o *Object) IsBuiltinFunction() bool

func (*Object) IsBytes

func (o *Object) IsBytes() bool

func (*Object) IsCallable

func (o *Object) IsCallable() bool

func (*Object) IsChar

func (o *Object) IsChar() bool

func (*Object) IsCompiledFunction

func (o *Object) IsCompiledFunction() bool

func (*Object) IsError

func (o *Object) IsError() bool

func (*Object) IsFalse

func (o *Object) IsFalse() bool

func (*Object) IsFloat

func (o *Object) IsFloat() bool

func (*Object) IsImmutable

func (o *Object) IsImmutable() bool

func (*Object) IsInt

func (o *Object) IsInt() bool

func (*Object) IsIterable

func (o *Object) IsIterable() bool

func (*Object) IsMap

func (o *Object) IsMap() bool

func (*Object) IsRecord

func (o *Object) IsRecord() bool

func (*Object) IsString

func (o *Object) IsString() bool

func (*Object) IsTime

func (o *Object) IsTime() bool

func (*Object) IsTrue

func (o *Object) IsTrue() bool

func (*Object) IsUndefined

func (o *Object) IsUndefined() bool

func (*Object) IsVariadic

func (o *Object) IsVariadic() bool

func (*Object) Iterate

func (o *Object) Iterate(core.Allocator) core.Iterator

func (*Object) Method

func (o *Object) Method(vm core.VM, name string, args []core.Value) (core.Value, error)

func (*Object) String

func (o *Object) String() string

func (*Object) TypeName

func (o *Object) TypeName() string

type Record

type Record struct {
	Object
	// contains filtered or unexported fields
}

func (*Record) Access

func (o *Record) Access(vm core.VM, index core.Value, mode core.Opcode) (core.Value, error)

func (*Record) AsBool

func (o *Record) AsBool() (bool, bool)

func (*Record) AsString

func (o *Record) AsString() (string, bool)

func (*Record) Assign

func (o *Record) Assign(index, value core.Value) error

func (*Record) BinaryOp

func (o *Record) BinaryOp(vm core.VM, op token.Token, rhs core.Value) (core.Value, error)

func (*Record) Copy

func (o *Record) Copy(alloc core.Allocator) core.Value

func (*Record) Delete

func (o *Record) Delete(key string)

func (*Record) Equals

func (o *Record) Equals(x core.Value) bool

func (*Record) Get

func (o *Record) Get(key string) (core.Value, bool)

func (*Record) GobDecode

func (o *Record) GobDecode(b []byte) error

func (*Record) GobEncode

func (o *Record) GobEncode() ([]byte, error)

func (*Record) Has

func (o *Record) Has(key string) bool

func (*Record) Interface

func (o *Record) Interface() any

func (*Record) IsEmpty

func (o *Record) IsEmpty() bool

func (*Record) IsFalse

func (o *Record) IsFalse() bool

func (*Record) IsImmutable

func (o *Record) IsImmutable() bool

func (*Record) IsIterable

func (o *Record) IsIterable() bool

func (*Record) IsRecord

func (o *Record) IsRecord() bool

func (*Record) IsTrue

func (o *Record) IsTrue() bool

func (*Record) Iterate

func (o *Record) Iterate(alloc core.Allocator) core.Iterator

func (*Record) Keys

func (o *Record) Keys() []string

func (*Record) Len

func (o *Record) Len() int

func (*Record) Method

func (o *Record) Method(vm core.VM, name string, args []core.Value) (core.Value, error)

func (*Record) Set

func (o *Record) Set(val map[string]core.Value, immutable bool)

func (*Record) SetKey

func (o *Record) SetKey(key string, val core.Value)

func (*Record) String

func (o *Record) String() string

func (*Record) TypeName

func (o *Record) TypeName() string

func (*Record) Value

func (o *Record) Value() map[string]core.Value

type String

type String struct {
	Object
	// contains filtered or unexported fields
}

func (*String) Access

func (o *String) Access(vm core.VM, index core.Value, mode core.Opcode) (core.Value, error)

func (*String) Append

func (o *String) Append(s string)

func (*String) AsBool

func (o *String) AsBool() (bool, bool)

func (*String) AsBytes

func (o *String) AsBytes() ([]byte, bool)

func (*String) AsChar

func (o *String) AsChar() (rune, bool)

func (*String) AsFloat

func (o *String) AsFloat() (float64, bool)

func (*String) AsInt

func (o *String) AsInt() (int64, bool)

func (*String) AsString

func (o *String) AsString() (string, bool)

func (*String) AsTime

func (o *String) AsTime() (time.Time, bool)

func (*String) Assign

func (o *String) Assign(core.Value, core.Value) error

func (*String) At

func (o *String) At(i int) rune

func (*String) BinaryOp

func (o *String) BinaryOp(vm core.VM, op token.Token, rhs core.Value) (core.Value, error)

func (*String) Copy

func (o *String) Copy(alloc core.Allocator) core.Value

func (*String) Equals

func (o *String) Equals(x core.Value) bool

func (*String) Get

func (o *String) Get(i int) (rune, bool)

func (*String) GobDecode

func (o *String) GobDecode(b []byte) error

func (*String) GobEncode

func (o *String) GobEncode() ([]byte, error)

func (*String) Interface

func (o *String) Interface() any

func (*String) IsEmpty

func (o *String) IsEmpty() bool

func (*String) IsFalse

func (o *String) IsFalse() bool

func (*String) IsIterable

func (o *String) IsIterable() bool

func (*String) IsString

func (o *String) IsString() bool

func (*String) IsTrue

func (o *String) IsTrue() bool

func (*String) Iterate

func (o *String) Iterate(alloc core.Allocator) core.Iterator

func (*String) Len

func (o *String) Len() int

func (*String) Method

func (o *String) Method(vm core.VM, name string, args []core.Value) (core.Value, error)

func (*String) Runes

func (o *String) Runes() []rune

func (*String) Set

func (o *String) Set(s string)

func (*String) String

func (o *String) String() string

func (*String) Substring

func (o *String) Substring(start, end int) string

func (*String) TypeName

func (o *String) TypeName() string

func (*String) Value

func (o *String) Value() string

type Time

type Time struct {
	Object
	// contains filtered or unexported fields
}

func (*Time) Access

func (o *Time) Access(vm core.VM, index core.Value, op core.Opcode) (core.Value, error)

func (*Time) AsBool

func (o *Time) AsBool() (bool, bool)

func (*Time) AsInt

func (o *Time) AsInt() (int64, bool)

func (*Time) AsString

func (o *Time) AsString() (string, bool)

func (*Time) AsTime

func (o *Time) AsTime() (time.Time, bool)

func (*Time) Assign

func (o *Time) Assign(core.Value, core.Value) error

func (*Time) BinaryOp

func (o *Time) BinaryOp(vm core.VM, op token.Token, rhs core.Value) (core.Value, error)

func (*Time) Copy

func (o *Time) Copy(alloc core.Allocator) core.Value

func (*Time) Equals

func (o *Time) Equals(x core.Value) bool

func (*Time) GobDecode

func (o *Time) GobDecode(b []byte) error

func (*Time) GobEncode

func (o *Time) GobEncode() ([]byte, error)

func (*Time) Interface

func (o *Time) Interface() any

func (*Time) IsFalse

func (o *Time) IsFalse() bool

func (*Time) IsTime

func (o *Time) IsTime() bool

func (*Time) IsTrue

func (o *Time) IsTrue() bool

func (*Time) Method

func (o *Time) Method(vm core.VM, name string, args []core.Value) (core.Value, error)

func (*Time) Set

func (o *Time) Set(t time.Time)

func (*Time) String

func (o *Time) String() string

func (*Time) TypeName

func (o *Time) TypeName() string

func (*Time) Value

func (o *Time) Value() time.Time

Jump to

Keyboard shortcuts

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