Documentation ¶
Index ¶
- Constants
- Variables
- func ArityError(arity, argCount UInt32) error
- func ArityErrorInBinaryOperatorOverload() error
- func ArityErrorInUnaryOperatorOverload() error
- func ArityGeneratorError(method string) error
- func AssertionFailure(message string) error
- func BytesChangeMustBeWithNumericTypesOnly() error
- func CannotDeriveFromValue(value Value) error
- func DebugModule(input *bytes.Buffer, script string, stdlib map[string]LibLoader)
- func DivisionByZeroError() error
- func ExpectedCallableValueInDeferError(value Value) error
- func ExpectedIterableValueError(value Value) error
- func ExpectedListToSpreadError(value Value) error
- func ExpectedTypeAndGotOtherType(expected, got string) error
- func ExpectedUnpackableValueError(value Value) error
- func IndexOutOfRangeError(length, index Int) error
- func InstancesDoNotSupportSubscriptionWriting() error
- func IsNotMethodProperty(method, structName string) error
- func LoadModule(moduleName string) (*bytes.Buffer, error)
- func MethodNotDefined(method string, value Value) error
- func MethodNotOverloaded(method, structName string) error
- func NameNotDefinedInCompoundDataType(name string, dataStructure Value) error
- func NegativeShiftError(op string, lhs, rhs Value) error
- func NeverShouldHaveHappened(what string) error
- func OperatorNotDefined(op byte, value Value) error
- func OverloadedOperatorWithWrongArity(method string, foundArity, must UInt32) error
- func PrintCode(input *bytes.Buffer, script string)
- func PrintError(err error)
- func RangeExpectedIntegerValue(value Value) error
- func RangeExpectedPositiveValue(value Value) error
- func RangeExpressionError(value Value) error
- func RecordPropertyError(key Value) error
- func RunModule(input *bytes.Buffer, script string, stdlib map[string]LibLoader)
- func RuneOutOfRangeOrIllegal() error
- func SelectionOperationNotSupported(value Value) error
- func StackOverfloError() error
- func TimeModule(input *bytes.Buffer, script string, stdlib map[string]LibLoader)
- func TypeErrorInBinaryOperator(op string, lhs, rhs Value) error
- func TypeErrorInPrefixOperator(op string, value Value) error
- func UnpackCountDoesNotMatchError() error
- func ValueDoesNotSupportExtension(value Value) error
- func ValueDoesNotSupportSlicing(value Value) error
- func ValueDoesNotSupportSubscription(value Value) error
- func ValueIsImmutable(value Value) error
- func ValueIsNotAnIndexError(value Value) error
- func ValueIsNotValueSemantics(value Value) error
- func ValueNotHashableError(key Value) error
- func VarArgArityError(arity, argCount UInt32) error
- func VariableAlreadyDefined(identifier string) error
- func VariableNotDefined(identifier string) error
- func VidaFprint(w io.Writer, a ...Value) (n int, err error)
- func VidaFprintf(w io.Writer, format string, a ...Value) (n int, err error)
- func VidaFprintln(w io.Writer, a ...Value) (n int, err error)
- func VidaPrintf(format string, a ...Value) (n int, err error)
- func VidaSprint(a ...Value) string
- func VidaSprintf(format string, a ...Value) string
- func VidaSprintln(a ...Value) string
- type BInt
- func (b *BInt) BinaryOp(op byte, rhs Value) (Value, error)
- func (b *BInt) Clone() Value
- func (b *BInt) Description() string
- func (b *BInt) Equals(other Value) bool
- func (b *BInt) GetMethod(name string) (Value, bool, error)
- func (b *BInt) HasMethods() bool
- func (b *BInt) IsHashable() bool
- func (b *BInt) IsIterable() bool
- func (b *BInt) IsValueSemantics() bool
- func (b *BInt) MakeHashKey() HashKey
- func (b *BInt) MakeIterator() Iterator
- func (b *BInt) PrefixOp(op byte) (Value, error)
- func (b *BInt) ToInt() Int
- func (b *BInt) TypeName() string
- type Bool
- func (b Bool) BinaryOp(op byte, rhs Value) (Value, error)
- func (b Bool) Clone() Value
- func (b Bool) Description() string
- func (b Bool) Equals(other Value) bool
- func (b Bool) GetMethod(name string) (Value, bool, error)
- func (b Bool) HasMethods() bool
- func (b Bool) IsHashable() bool
- func (b Bool) IsIterable() bool
- func (b Bool) IsValueSemantics() bool
- func (b Bool) MakeHashKey() HashKey
- func (b Bool) MakeIterator() Iterator
- func (b Bool) PrefixOp(op byte) (Value, error)
- func (b Bool) TypeName() string
- type Byte
- func (b Byte) BinaryOp(op byte, rhs Value) (Value, error)
- func (b Byte) Clone() Value
- func (b Byte) Description() string
- func (b Byte) Equals(other Value) bool
- func (b Byte) GetMethod(name string) (Value, bool, error)
- func (b Byte) HasMethods() bool
- func (b Byte) IsHashable() bool
- func (b Byte) IsIterable() bool
- func (b Byte) IsValueSemantics() bool
- func (b Byte) MakeHashKey() HashKey
- func (b Byte) MakeIterator() Iterator
- func (b Byte) PrefixOp(op byte) (Value, error)
- func (b Byte) ToInt() Int
- func (b Byte) TypeName() string
- type Bytecode
- type Bytes
- func (b *Bytes) BinaryOp(op byte, rhs Value) (Value, error)
- func (b *Bytes) Clone() Value
- func (b *Bytes) Description() string
- func (b *Bytes) Equals(other Value) bool
- func (b *Bytes) GetMethod(name string) (Value, bool, error)
- func (b *Bytes) HasMethods() bool
- func (b *Bytes) IsHashable() bool
- func (b *Bytes) IsIterable() bool
- func (b *Bytes) IsValueSemantics() bool
- func (b *Bytes) MakeHashKey() HashKey
- func (b *Bytes) MakeIterator() Iterator
- func (b *Bytes) PrefixOp(op byte) (Value, error)
- func (b *Bytes) SliceGet(sliceType UInt32, low, high Value) (Value, error)
- func (b *Bytes) SliceSet(sliceType UInt32, low, high, value Value) error
- func (b *Bytes) SubscriptGet(index Value) (Value, error)
- func (b *Bytes) SubscriptSet(index, value Value) error
- func (b *Bytes) TypeName() string
- type BytesIterator
- func (iter *BytesIterator) BinaryOp(op byte, rhs Value) (Value, error)
- func (iter *BytesIterator) Clone() Value
- func (iter *BytesIterator) Description() string
- func (iter *BytesIterator) Equals(other Value) bool
- func (iter *BytesIterator) Exhausted() bool
- func (iter *BytesIterator) GetMethod(name string) (Value, bool, error)
- func (iter *BytesIterator) HasMethods() bool
- func (iter *BytesIterator) IsHashable() bool
- func (iter *BytesIterator) IsIterable() bool
- func (iter *BytesIterator) IsValueSemantics() bool
- func (iter *BytesIterator) MakeHashKey() HashKey
- func (iter *BytesIterator) MakeIterator() Iterator
- func (iter *BytesIterator) Next() Value
- func (iter *BytesIterator) PrefixOp(op byte) (Value, error)
- func (iter *BytesIterator) TypeName() string
- type Closure
- func (closure Closure) BinaryOp(op byte, rhs Value) (Value, error)
- func (closure Closure) Clone() Value
- func (closure Closure) Description() string
- func (closure Closure) Equals(other Value) bool
- func (closure Closure) GetMethod(name string) (Value, bool, error)
- func (closure Closure) HasMethods() bool
- func (closure Closure) IsHashable() bool
- func (closure Closure) IsIterable() bool
- func (closure Closure) IsValueSemantics() bool
- func (closure Closure) MakeHashKey() HashKey
- func (closure Closure) MakeIterator() Iterator
- func (closure Closure) PrefixOp(op byte) (Value, error)
- func (closure Closure) TypeName() string
- type Complex
- func (z Complex) BinaryOp(op byte, rhs Value) (Value, error)
- func (z Complex) Clone() Value
- func (z Complex) Description() string
- func (z Complex) Equals(other Value) bool
- func (z Complex) GetMethod(name string) (Value, bool, error)
- func (z Complex) HasMethods() bool
- func (z Complex) IsHashable() bool
- func (z Complex) IsIterable() bool
- func (z Complex) IsValueSemantics() bool
- func (z Complex) MakeHashKey() HashKey
- func (z Complex) MakeIterator() Iterator
- func (z Complex) PrefixOp(op byte) (Value, error)
- func (z Complex) TypeName() string
- type Fiber
- func (fiber *Fiber) BinaryOp(op byte, rhs Value) (Value, error)
- func (fiber *Fiber) Clone() Value
- func (fiber Fiber) Description() string
- func (fiber *Fiber) Equals(other Value) bool
- func (fiber *Fiber) GetMethod(name string) (Value, bool, error)
- func (fiber *Fiber) HasMethods() bool
- func (fiber *Fiber) IsHashable() bool
- func (fiber *Fiber) IsIterable() bool
- func (fiber *Fiber) IsValueSemantics() bool
- func (fiber *Fiber) MakeHashKey() HashKey
- func (fiber *Fiber) MakeIterator() Iterator
- func (fiber *Fiber) PrefixOp(op byte) (Value, error)
- func (fiber Fiber) TypeName() string
- type Float
- func (f Float) BinaryOp(op byte, rhs Value) (Value, error)
- func (f Float) Clone() Value
- func (f Float) Description() string
- func (f Float) Equals(other Value) bool
- func (f Float) GetMethod(name string) (Value, bool, error)
- func (f Float) HasMethods() bool
- func (f Float) IsHashable() bool
- func (f Float) IsIterable() bool
- func (f Float) IsValueSemantics() bool
- func (f Float) MakeHashKey() HashKey
- func (f Float) MakeIterator() Iterator
- func (f Float) PrefixOp(op byte) (Value, error)
- func (f Float) TypeName() string
- type Frame
- type Function
- func (function Function) BinaryOp(op byte, rhs Value) (Value, error)
- func (function Function) Clone() Value
- func (function Function) Description() string
- func (function Function) Equals(other Value) bool
- func (function Function) GetMethod(name string) (Value, bool, error)
- func (function Function) HasMethods() bool
- func (function Function) IsHashable() bool
- func (function Function) IsIterable() bool
- func (function Function) IsValueSemantics() bool
- func (function Function) MakeHashKey() HashKey
- func (function Function) MakeIterator() Iterator
- func (function Function) PrefixOp(op byte) (Value, error)
- func (function Function) TypeName() string
- type GFunction
- func (gf GFunction) BinaryOp(op byte, rhs Value) (Value, error)
- func (gf GFunction) Clone() Value
- func (gf GFunction) Description() string
- func (gf GFunction) Equals(other Value) bool
- func (gf GFunction) GetMethod(name string) (Value, bool, error)
- func (gf GFunction) HasMethods() bool
- func (gf GFunction) IsHashable() bool
- func (gf GFunction) IsIterable() bool
- func (gf GFunction) IsValueSemantics() bool
- func (gf GFunction) MakeHashKey() HashKey
- func (gf GFunction) MakeIterator() Iterator
- func (gf GFunction) PrefixOp(op byte) (Value, error)
- func (gf GFunction) TypeName() string
- type GModule
- func (mod GModule) BinaryOp(op byte, rhs Value) (Value, error)
- func (mod GModule) Clone() Value
- func (module GModule) Description() string
- func (mod GModule) Equals(other Value) bool
- func (mod GModule) GetMethod(name string) (Value, bool, error)
- func (mod GModule) GetModuleName() string
- func (mod GModule) HasMethods() bool
- func (mod GModule) IsGModule() bool
- func (mod GModule) IsHashable() bool
- func (mod GModule) IsIterable() bool
- func (mod GModule) IsVModule() bool
- func (mod GModule) IsValueSemantics() bool
- func (mod GModule) MakeHashKey() HashKey
- func (mod GModule) MakeIterator() Iterator
- func (mod GModule) PrefixOp(op byte) (Value, error)
- func (mod GModule) SelectorGet(field string) (Value, error)
- func (mod GModule) SelectorSet(string, Value) error
- func (mod GModule) TypeName() string
- type Global
- type HashKey
- func (hash HashKey) BinaryOp(op byte, rhs Value) (Value, error)
- func (hash HashKey) Clone() Value
- func (hash HashKey) Description() string
- func (hash HashKey) Equals(other Value) bool
- func (hash HashKey) GetMethod(name string) (Value, bool, error)
- func (hash HashKey) HasMethods() bool
- func (hash HashKey) IsHashable() bool
- func (hash HashKey) IsIterable() bool
- func (hash HashKey) IsValueSemantics() bool
- func (hash HashKey) MakeHashKey() HashKey
- func (hash HashKey) MakeIterator() Iterator
- func (hash HashKey) PrefixOp(op byte) (Value, error)
- func (hash HashKey) TypeName() string
- type IStop
- func (istop IStop) BinaryOp(op byte, rhs Value) (Value, error)
- func (istop IStop) Clone() Value
- func (eof IStop) Description() string
- func (istop IStop) Equals(other Value) bool
- func (istop IStop) GetMethod(name string) (Value, bool, error)
- func (istop IStop) HasMethods() bool
- func (istop IStop) IsHashable() bool
- func (istop IStop) IsIterable() bool
- func (istop IStop) IsValueSemantics() bool
- func (istop IStop) MakeHashKey() HashKey
- func (istop IStop) MakeIterator() Iterator
- func (istop IStop) PrefixOp(op byte) (Value, error)
- func (istop IStop) TypeName() string
- type Importable
- type Instance
- func (instance Instance) BinaryOp(op byte, rhs Value) (Value, error)
- func (instance Instance) Clone() Value
- func (instance Instance) Description() string
- func (instance Instance) Equals(other Value) bool
- func (instance Instance) GetMethod(name string) (Value, bool, error)
- func (instance Instance) HasMethods() bool
- func (instance Instance) IsHashable() bool
- func (instance Instance) IsIterable() bool
- func (instance Instance) IsValueSemantics() bool
- func (instance Instance) MakeHashKey() HashKey
- func (instance Instance) MakeIterator() Iterator
- func (instance Instance) PrefixOp(op byte) (Value, error)
- func (instance Instance) SelectorGet(field string) (Value, error)
- func (instance Instance) SelectorSet(property string, value Value) error
- func (instance Instance) SubscriptGet(index Value) (Value, error)
- func (instance Instance) SubscriptSet(index, value Value) error
- func (instance Instance) TypeName() string
- type Int
- func (integer Int) BinaryOp(op byte, rhs Value) (Value, error)
- func (integer Int) Clone() Value
- func (integer Int) Description() string
- func (integer Int) Equals(other Value) bool
- func (integer Int) GetMethod(name string) (Value, bool, error)
- func (integer Int) HasMethods() bool
- func (integer Int) IsHashable() bool
- func (integer Int) IsIterable() bool
- func (integer Int) IsValueSemantics() bool
- func (integer Int) MakeHashKey() HashKey
- func (integer Int) MakeIterator() Iterator
- func (integer Int) PrefixOp(op byte) (Value, error)
- func (integer Int) ToInt() Int
- func (integer Int) TypeName() string
- type Int32
- type IntegerNumber
- type Iterator
- type LibLoader
- type List
- func (list *List) BinaryOp(op byte, rhs Value) (Value, error)
- func (list *List) Clone() Value
- func (list *List) Description() string
- func (list *List) Equals(other Value) bool
- func (list *List) GetMethod(name string) (Value, bool, error)
- func (list *List) HasMethods() bool
- func (list *List) IsHashable() bool
- func (list *List) IsIterable() bool
- func (list *List) IsValueSemantics() bool
- func (list *List) MakeHashKey() HashKey
- func (list *List) MakeIterator() Iterator
- func (list *List) PrefixOp(op byte) (Value, error)
- func (list *List) SliceGet(sliceType UInt32, low, high Value) (Value, error)
- func (list *List) SliceSet(sliceType UInt32, low, high, value Value) error
- func (list *List) SubscriptGet(index Value) (Value, error)
- func (list *List) SubscriptSet(index, value Value) error
- func (list *List) TypeName() string
- type ListIterator
- func (iter *ListIterator) BinaryOp(op byte, rhs Value) (Value, error)
- func (iter *ListIterator) Clone() Value
- func (iter *ListIterator) Description() string
- func (iter *ListIterator) Equals(other Value) bool
- func (iter *ListIterator) Exhausted() bool
- func (iter *ListIterator) GetMethod(name string) (Value, bool, error)
- func (iter *ListIterator) HasMethods() bool
- func (iter *ListIterator) IsHashable() bool
- func (iter *ListIterator) IsIterable() bool
- func (iter *ListIterator) IsValueSemantics() bool
- func (iter *ListIterator) MakeHashKey() HashKey
- func (iter *ListIterator) MakeIterator() Iterator
- func (iter *ListIterator) Next() Value
- func (iter *ListIterator) PrefixOp(op byte) (Value, error)
- func (iter *ListIterator) TypeName() string
- type Map
- func (m Map) BinaryOp(op byte, rhs Value) (Value, error)
- func (m Map) Clone() Value
- func (m Map) Description() string
- func (m Map) Equals(other Value) bool
- func (m Map) GetMethod(name string) (Value, bool, error)
- func (m Map) HasMethods() bool
- func (m Map) IsHashable() bool
- func (m Map) IsIterable() bool
- func (m Map) IsValueSemantics() bool
- func (m Map) MakeHashKey() HashKey
- func (m Map) MakeIterator() Iterator
- func (m Map) PrefixOp(op byte) (Value, error)
- func (m Map) SubscriptGet(index Value) (Value, error)
- func (m Map) SubscriptSet(index, value Value) error
- func (m Map) TypeName() string
- type MapIterator
- func (iter *MapIterator) BinaryOp(op byte, rhs Value) (Value, error)
- func (iter *MapIterator) Clone() Value
- func (iter *MapIterator) Description() string
- func (iter *MapIterator) Equals(other Value) bool
- func (iter *MapIterator) Exhausted() bool
- func (iter *MapIterator) GetMethod(name string) (Value, bool, error)
- func (iter *MapIterator) HasMethods() bool
- func (iter *MapIterator) IsHashable() bool
- func (iter *MapIterator) IsIterable() bool
- func (iter *MapIterator) IsValueSemantics() bool
- func (iter *MapIterator) MakeHashKey() HashKey
- func (iter *MapIterator) MakeIterator() Iterator
- func (iter *MapIterator) Next() Value
- func (iter *MapIterator) PrefixOp(op byte) (Value, error)
- func (iter *MapIterator) TypeName() string
- type NamedConstants
- func (constants NamedConstants) BinaryOp(op byte, rhs Value) (Value, error)
- func (constants NamedConstants) Clone() Value
- func (constants NamedConstants) Description() string
- func (constants NamedConstants) Equals(other Value) bool
- func (constants NamedConstants) GetMethod(name string) (Value, bool, error)
- func (constants NamedConstants) HasMethods() bool
- func (constants NamedConstants) IsHashable() bool
- func (constants NamedConstants) IsIterable() bool
- func (constants NamedConstants) IsValueSemantics() bool
- func (constants NamedConstants) MakeHashKey() HashKey
- func (constants NamedConstants) MakeIterator() Iterator
- func (constants NamedConstants) PrefixOp(op byte) (Value, error)
- func (constants NamedConstants) SelectorGet(field string) (Value, error)
- func (constants NamedConstants) SelectorSet(string, Value) error
- func (constants NamedConstants) TypeName() string
- type Namespace
- type Nil
- func (n Nil) BinaryOp(op byte, rhs Value) (Value, error)
- func (n Nil) Clone() Value
- func (n Nil) Description() string
- func (n Nil) Equals(other Value) bool
- func (n Nil) GetMethod(name string) (Value, bool, error)
- func (n Nil) HasMethods() bool
- func (n Nil) IsHashable() bool
- func (n Nil) IsIterable() bool
- func (n Nil) IsValueSemantics() bool
- func (n Nil) MakeHashKey() HashKey
- func (n Nil) MakeIterator() Iterator
- func (n Nil) PrefixOp(op byte) (Value, error)
- func (n Nil) TypeName() string
- type NumericIterator
- func (iter *NumericIterator) BinaryOp(op byte, rhs Value) (Value, error)
- func (iter *NumericIterator) Clone() Value
- func (iter *NumericIterator) Description() string
- func (iter *NumericIterator) Equals(other Value) bool
- func (iter *NumericIterator) Exhausted() bool
- func (iter *NumericIterator) GetMethod(name string) (Value, bool, error)
- func (iter *NumericIterator) HasMethods() bool
- func (iter *NumericIterator) IsHashable() bool
- func (iter *NumericIterator) IsIterable() bool
- func (iter *NumericIterator) IsValueSemantics() bool
- func (iter *NumericIterator) MakeHashKey() HashKey
- func (iter *NumericIterator) MakeIterator() Iterator
- func (iter *NumericIterator) Next() Value
- func (iter *NumericIterator) PrefixOp(op byte) (Value, error)
- func (iter *NumericIterator) TypeName() string
- type Pair
- func (pair Pair) BinaryOp(op byte, rhs Value) (Value, error)
- func (pair Pair) Clone() Value
- func (pair Pair) Description() string
- func (pair Pair) Equals(other Value) bool
- func (pair Pair) GetMethod(name string) (Value, bool, error)
- func (pair Pair) HasMethods() bool
- func (pair Pair) IsHashable() bool
- func (pair Pair) IsIterable() bool
- func (pair Pair) IsValueSemantics() bool
- func (pair Pair) MakeHashKey() HashKey
- func (pair Pair) MakeIterator() Iterator
- func (pair Pair) PrefixOp(op byte) (Value, error)
- func (pair Pair) SelectorGet(field string) (Value, error)
- func (pair Pair) SelectorSet(string, Value) error
- func (pair Pair) TypeName() string
- type Rational
- func (rat *Rational) BinaryOp(op byte, rhs Value) (Value, error)
- func (rat *Rational) Clone() Value
- func (rat *Rational) Description() string
- func (rat *Rational) Equals(other Value) bool
- func (rat *Rational) GetMethod(name string) (Value, bool, error)
- func (rat *Rational) HasMethods() bool
- func (rat *Rational) IsHashable() bool
- func (rat *Rational) IsIterable() bool
- func (rat *Rational) IsValueSemantics() bool
- func (rat *Rational) MakeHashKey() HashKey
- func (rat *Rational) MakeIterator() Iterator
- func (rat *Rational) PrefixOp(op byte) (Value, error)
- func (rat *Rational) TypeName() string
- type Record
- func (record Record) BinaryOp(op byte, rhs Value) (Value, error)
- func (record Record) Clone() Value
- func (record Record) Description() string
- func (record Record) Equals(other Value) bool
- func (record Record) GetMethod(name string) (Value, bool, error)
- func (record Record) HasMethods() bool
- func (record Record) IsHashable() bool
- func (record Record) IsIterable() bool
- func (record Record) IsValueSemantics() bool
- func (record Record) MakeHashKey() HashKey
- func (record Record) MakeIterator() Iterator
- func (record Record) PrefixOp(op byte) (Value, error)
- func (record Record) SelectorGet(field string) (Value, error)
- func (record Record) SelectorSet(property string, value Value) error
- func (record Record) SubscriptGet(index Value) (Value, error)
- func (record Record) SubscriptSet(index, value Value) error
- func (record Record) TypeName() string
- type RecordIterator
- func (iter *RecordIterator) BinaryOp(op byte, rhs Value) (Value, error)
- func (iter *RecordIterator) Clone() Value
- func (iter *RecordIterator) Description() string
- func (iter *RecordIterator) Equals(other Value) bool
- func (iter *RecordIterator) Exhausted() bool
- func (iter *RecordIterator) GetMethod(name string) (Value, bool, error)
- func (iter *RecordIterator) HasMethods() bool
- func (iter *RecordIterator) IsHashable() bool
- func (iter *RecordIterator) IsIterable() bool
- func (iter *RecordIterator) IsValueSemantics() bool
- func (iter *RecordIterator) MakeHashKey() HashKey
- func (iter *RecordIterator) MakeIterator() Iterator
- func (iter *RecordIterator) Next() Value
- func (iter *RecordIterator) PrefixOp(op byte) (Value, error)
- func (iter *RecordIterator) TypeName() string
- type Repl
- type Result
- func (result Result) BinaryOp(op byte, rhs Value) (Value, error)
- func (result Result) Clone() Value
- func (result Result) Description() string
- func (result Result) Equals(other Value) bool
- func (result Result) GetMethod(name string) (Value, bool, error)
- func (result Result) HasMethods() bool
- func (result Result) IsHashable() bool
- func (result Result) IsIterable() bool
- func (result Result) IsValueSemantics() bool
- func (result Result) MakeHashKey() HashKey
- func (result Result) MakeIterator() Iterator
- func (result Result) PrefixOp(op byte) (Value, error)
- func (result Result) SelectorGet(field string) (Value, error)
- func (result Result) SelectorSet(string, Value) error
- func (result Result) TypeName() string
- type Rune
- func (r Rune) BinaryOp(op byte, rhs Value) (Value, error)
- func (r Rune) Clone() Value
- func (r Rune) Description() string
- func (r Rune) Equals(other Value) bool
- func (r Rune) GetMethod(name string) (Value, bool, error)
- func (r Rune) HasMethods() bool
- func (r Rune) IsHashable() bool
- func (r Rune) IsIterable() bool
- func (r Rune) IsValueSemantics() bool
- func (r Rune) MakeHashKey() HashKey
- func (r Rune) MakeIterator() Iterator
- func (r Rune) PrefixOp(op byte) (Value, error)
- func (r Rune) TypeName() string
- type SelectorOperable
- type Set
- func (set Set) BinaryOp(op byte, rhs Value) (Value, error)
- func (set Set) Clone() Value
- func (set Set) Description() string
- func (set Set) Equals(other Value) bool
- func (set Set) GetMethod(name string) (Value, bool, error)
- func (set Set) HasMethods() bool
- func (set Set) IsHashable() bool
- func (set Set) IsIterable() bool
- func (set Set) IsValueSemantics() bool
- func (set Set) MakeHashKey() HashKey
- func (set Set) MakeIterator() Iterator
- func (set Set) PrefixOp(op byte) (Value, error)
- func (set Set) TypeName() string
- type SetIterator
- func (iter *SetIterator) BinaryOp(op byte, rhs Value) (Value, error)
- func (iter *SetIterator) Clone() Value
- func (iter *SetIterator) Description() string
- func (iter *SetIterator) Equals(other Value) bool
- func (iter *SetIterator) Exhausted() bool
- func (iter *SetIterator) GetMethod(name string) (Value, bool, error)
- func (iter *SetIterator) HasMethods() bool
- func (iter *SetIterator) IsHashable() bool
- func (iter *SetIterator) IsIterable() bool
- func (iter *SetIterator) IsValueSemantics() bool
- func (iter *SetIterator) MakeHashKey() HashKey
- func (iter *SetIterator) MakeIterator() Iterator
- func (iter *SetIterator) Next() Value
- func (iter *SetIterator) PrefixOp(op byte) (Value, error)
- func (iter *SetIterator) TypeName() string
- type SliceOperable
- type String
- func (s *String) BinaryOp(op byte, rhs Value) (Value, error)
- func (s *String) Clone() Value
- func (s *String) Description() string
- func (s *String) Equals(other Value) bool
- func (s *String) GetMethod(name string) (Value, bool, error)
- func (s *String) HasMethods() bool
- func (s *String) IsHashable() bool
- func (s *String) IsIterable() bool
- func (s *String) IsValueSemantics() bool
- func (s *String) MakeHashKey() HashKey
- func (s *String) MakeIterator() Iterator
- func (s *String) PrefixOp(op byte) (Value, error)
- func (s *String) SliceGet(sliceType UInt32, low, high Value) (Value, error)
- func (s *String) SliceSet(sliceType UInt32, low, high, value Value) error
- func (s *String) SubscriptGet(index Value) (Value, error)
- func (s *String) SubscriptSet(index, value Value) error
- func (s *String) TypeName() string
- type StringIterator
- func (iter *StringIterator) BinaryOp(op byte, rhs Value) (Value, error)
- func (iter *StringIterator) Clone() Value
- func (iter *StringIterator) Description() string
- func (iter *StringIterator) Equals(other Value) bool
- func (iter *StringIterator) Exhausted() bool
- func (iter *StringIterator) GetMethod(name string) (Value, bool, error)
- func (iter *StringIterator) HasMethods() bool
- func (iter *StringIterator) IsHashable() bool
- func (iter *StringIterator) IsIterable() bool
- func (iter *StringIterator) IsValueSemantics() bool
- func (iter *StringIterator) MakeHashKey() HashKey
- func (iter *StringIterator) MakeIterator() Iterator
- func (iter *StringIterator) Next() Value
- func (iter *StringIterator) PrefixOp(op byte) (Value, error)
- func (iter *StringIterator) TypeName() string
- type Struct
- func (s Struct) BinaryOp(op byte, rhs Value) (Value, error)
- func (s Struct) Clone() Value
- func (s Struct) Description() string
- func (s Struct) Equals(other Value) bool
- func (s Struct) GetMethod(name string) (Value, bool, error)
- func (s Struct) HasMethods() bool
- func (s Struct) IsHashable() bool
- func (s Struct) IsIterable() bool
- func (s Struct) IsValueSemantics() bool
- func (s Struct) MakeHashKey() HashKey
- func (s Struct) MakeIterator() Iterator
- func (s Struct) PrefixOp(op byte) (Value, error)
- func (s Struct) SelectorGet(field string) (Value, error)
- func (s Struct) SelectorSet(string, Value) error
- func (s Struct) TypeName() string
- type SubscriptOperable
- type Tuple
- func (tuple Tuple) BinaryOp(op byte, rhs Value) (Value, error)
- func (tuple Tuple) Clone() Value
- func (tuple Tuple) Description() string
- func (tuple Tuple) Equals(other Value) bool
- func (tuple Tuple) GetMethod(name string) (Value, bool, error)
- func (tuple Tuple) HasMethods() bool
- func (tuple Tuple) IsHashable() bool
- func (tuple Tuple) IsIterable() bool
- func (tuple Tuple) IsValueSemantics() bool
- func (tuple Tuple) MakeHashKey() HashKey
- func (tuple Tuple) MakeIterator() Iterator
- func (tuple Tuple) PrefixOp(op byte) (Value, error)
- func (tuple Tuple) SelectorGet(field string) (Value, error)
- func (tuple Tuple) SelectorSet(string, Value) error
- func (tuple Tuple) TypeName() string
- type UInt
- func (u UInt) BinaryOp(op byte, rhs Value) (Value, error)
- func (u UInt) Clone() Value
- func (u UInt) Description() string
- func (u UInt) Equals(other Value) bool
- func (u UInt) GetMethod(name string) (Value, bool, error)
- func (u UInt) HasMethods() bool
- func (u UInt) IsHashable() bool
- func (u UInt) IsIterable() bool
- func (u UInt) IsValueSemantics() bool
- func (u UInt) MakeHashKey() HashKey
- func (u UInt) MakeIterator() Iterator
- func (u UInt) PrefixOp(op byte) (Value, error)
- func (u UInt) ToInt() Int
- func (u UInt) TypeName() string
- type UInt32
- type VM
- type VModule
- func (mod *VModule) BinaryOp(op byte, rhs Value) (Value, error)
- func (mod *VModule) Clone() Value
- func (mod *VModule) Description() string
- func (mod *VModule) Equals(other Value) bool
- func (mod *VModule) GetMethod(name string) (Value, bool, error)
- func (mod *VModule) GetModuleName() string
- func (mod *VModule) HasMethods() bool
- func (mod *VModule) IsGModule() bool
- func (mod *VModule) IsHashable() bool
- func (mod *VModule) IsIterable() bool
- func (mod *VModule) IsVModule() bool
- func (mod *VModule) IsValueSemantics() bool
- func (mod *VModule) MakeHashKey() HashKey
- func (mod *VModule) MakeIterator() Iterator
- func (mod *VModule) PrefixOp(op byte) (Value, error)
- func (mod *VModule) SelectorGet(field string) (Value, error)
- func (mod *VModule) SelectorSet(string, Value) error
- func (mod *VModule) TypeName() string
- type Value
- func FiberCurrent(args ...Value) (Value, error)
- func FiberIsAlive(args ...Value) (Value, error)
- func FiberNew(args ...Value) (Value, error)
- func FiberParent(args ...Value) (Value, error)
- func FiberPrintStack(args ...Value) (Value, error)
- func FiberRecycle(args ...Value) (Value, error)
- func FiberRun(args ...Value) (Value, error)
- func FiberState(args ...Value) (Value, error)
- func FiberSuspend(args ...Value) (Value, error)
- func FiberTerminate(args ...Value) (Value, error)
- func FiberWrap(args ...Value) (Value, error)
Constants ¶
const ( TKAdd byte TKMinus TKMul TKDiv TKMod TKPercent TKPower TKAmpersand TKBar TKHat TKLShift TKRShift TKGT TKGE TKLT TKLE TKAnd TKOr TKNot TKTilde )
Numeric constants for the definition of the token types
const ( ModuleExtension = ".vida" ModuleCompiledExtension = ".vo" LangVersion = "0.7.0" VMEngineVersion = "0.5.0" STDLibVersion = "0.3.0" LangName = "Vida 🌻" LangHeader = "A general-purpose programming language." LangWebSite = "https://www.vida-lang.org" )
Global values for true, false, nil and iterator stop.
Variables ¶
var BytesInterface = Namespace{ "isEmpty": GFunction{Name: "isEmpty", Value: bytesIsEmpty}, "length": GFunction{Name: "length", Value: bytesLength}, "clear": GFunction{Name: "clear", Value: bytesClear}, "contains": GFunction{Name: "contains", Value: bytesContains}, "clone": GFunction{Name: "clone", Value: bytesClone}, "remove": GFunction{Name: "remove", Value: bytesRemove}, "randomElement": GFunction{Name: "randomElement", Value: bytesRandomElement}, "makeIterator": GFunction{Name: "makeIterator", Value: bytesMakeIterator}, }
BytesInterface is the collection of methods for the type Bytes.
var FiberInterface = Namespace{ "isAlive": GFunction{Name: "isAlive", Value: FiberIsAlive}, "state": GFunction{Name: "state", Value: FiberState}, "run": GFunction{Name: "run", Value: FiberRun}, "terminate": GFunction{Name: "terminate", Value: FiberTerminate}, }
FiberInterface is the set of methods for fiber instances.
var KindDescription = [...]string{ TKAdd: "+", TKMinus: "-", TKMul: "*", TKDiv: "/", TKMod: "mod", TKPercent: "%", TKPower: "**", TKAmpersand: "&", TKBar: "|", TKHat: "^", TKLShift: "<<", TKRShift: ">>", TKGT: ">", TKGE: ">=", TKLT: "<", TKLE: "<=", TKAnd: "and", TKOr: "or", TKNot: "not", TKTilde: "~", // contains filtered or unexported fields }
KindDescription is the string representation of a token type.
var ListInterface = Namespace{ "isEmpty": GFunction{Name: "isEmpty", Value: xsIsEmpty}, "length": GFunction{Name: "length", Value: xsLength}, "clear": GFunction{Name: "clear", Value: xsClear}, "contains": GFunction{Name: "contains", Value: xsContains}, "clone": GFunction{Name: "clone", Value: xsClone}, "remove": GFunction{Name: "remove", Value: xsRemove}, "randomElement": GFunction{Name: "randomElement", Value: xsRandomElement}, "makeIterator": GFunction{Name: "makeIterator", Value: xsMakeIterator}, "append": GFunction{Name: "append", Value: xsAppend}, "insert": GFunction{Name: "insert", Value: xsInsert}, "extend": GFunction{Name: "extend", Value: xsExtend}, "popLast": GFunction{Name: "popLast", Value: xsPopLast}, "popFirst": GFunction{Name: "popLast", Value: xsPopFirst}, "sort": GFunction{Name: "sort", Value: xsSort}, "sorted": GFunction{Name: "sorted", Value: xsSorted}, "reverse": GFunction{Name: "reverse", Value: xsReverse}, "reversed": GFunction{Name: "reversed", Value: xsReversed}, "shuffle": GFunction{Name: "shuffle", Value: xsShuffle}, "shuffled": GFunction{Name: "shuffled", Value: xsShuffled}, "removed": GFunction{Name: "removed", Value: xsRemoved}, "capacity": GFunction{Name: "capacity", Value: xsCap}, "indexOf": GFunction{Name: "indexOf", Value: xsIndex}, "countOf": GFunction{Name: "countOf", Value: xsCount}, "midIndex": GFunction{Name: "midIndex", Value: xsMidIndex}, }
ListInterface is the collection of methods for the type List.
var MapInterface = Namespace{ "isEmpty": GFunction{Name: "isEmpty", Value: mapIsEmpty}, "length": GFunction{Name: "length", Value: mapLength}, "clear": GFunction{Name: "clear", Value: mapClear}, "contains": GFunction{Name: "contains", Value: mapContains}, "clone": GFunction{Name: "clone", Value: mapClone}, "randomElement": GFunction{Name: "randomElement", Value: mapRandomElement}, "makeIterator": GFunction{Name: "makeIterator", Value: mapMakeIterator}, "remove": GFunction{Name: "remove", Value: mapDelete}, "keys": GFunction{Name: "keys", Value: mapKeys}, "values": GFunction{Name: "values", Value: mapValues}, "pairs": GFunction{Name: "pairs", Value: mapItems}, }
var SetInterface = Namespace{ "isEmpty": GFunction{Name: "isEmpty", Value: setIsEmpty}, "length": GFunction{Name: "length", Value: setLength}, "clear": GFunction{Name: "clear", Value: setClear}, "contains": GFunction{Name: "contains", Value: setMemebership}, "clone": GFunction{Name: "clone", Value: setClone}, "randomElement": GFunction{Name: "randomElement", Value: setRandomElement}, "makeIterator": GFunction{Name: "makeIterator", Value: setMakeIterator}, "remove": GFunction{Name: "remove", Value: setRemoveElements}, "add": GFunction{Name: "add", Value: setAddElements}, "difference": GFunction{Name: "difference", Value: setDifference}, "merge": GFunction{Name: "merge", Value: setMerge}, "merged": GFunction{Name: "merged", Value: setMerged}, "toList": GFunction{Name: "toList", Value: setToList}, "intersection": GFunction{Name: "intersection", Value: setIntersection}, "isDisjoint": GFunction{Name: "isDisjoint", Value: setIsDisjoint}, "isSubset": GFunction{Name: "isSubset", Value: setIsSubset}, "isSuperset": GFunction{Name: "isSuperset", Value: setIsSuperSet}, "symmetricDifference": GFunction{Name: "symmetricDifference", Value: setSymmetricDifference}, "union": GFunction{Name: "union", Value: setUnion}, }
var StringInterface = Namespace{ "isEmpty": GFunction{Name: "isEmpty", Value: stringIsEmpty}, "length": GFunction{Name: "length", Value: stringLength}, "contains": GFunction{Name: "contains", Value: stringContains}, "clone": GFunction{Name: "clone", Value: stringClone}, "randomElement": GFunction{Name: "randomElement", Value: stringRandomElement}, "makeIterator": GFunction{Name: "makeIterator", Value: stringMakeIterator}, "join": GFunction{Name: "join", Value: stringJoin}, "containsAny": GFunction{Name: "containsAny", Value: stringContainsAny}, "fields": GFunction{Name: "fields", Value: stringFields}, "trim": GFunction{Name: "trim", Value: stringTrim}, "trimLeft": GFunction{Name: "trimLeft", Value: stringTrimLeft}, "trimRight": GFunction{Name: "trimRight", Value: stringTrimRight}, "toLower": GFunction{Name: "toLower", Value: stringToLower}, "toUpper": GFunction{Name: "toUpper", Value: stringToUpper}, "toTitle": GFunction{Name: "toTittle", Value: stringToTitle}, "split": GFunction{Name: "split", Value: stringSplit}, "repeat": GFunction{Name: "repeat", Value: stringRepeat}, "replace": GFunction{Name: "replace", Value: stringReplace}, "hasPrefix": GFunction{Name: "hasPrefix", Value: stringHasPrefix}, "hasSuffix": GFunction{Name: "hasSuffix", Value: stringHasSuffix}, "count": GFunction{Name: "count", Value: stringCount}, "runes": GFunction{Name: "runes", Value: stringGetRunes}, "bytes": GFunction{Name: "runes", Value: stringGetBytes}, }
Functions ¶
func ArityError ¶
Error when a method or property was not found.
func ArityErrorInBinaryOperatorOverload ¶
func ArityErrorInBinaryOperatorOverload() error
Arity error in binary operator overload.
func ArityErrorInUnaryOperatorOverload ¶
func ArityErrorInUnaryOperatorOverload() error
Arity error in unary operator overload.
func ArityGeneratorError ¶
Error when arity of a generator function is not zero.
func AssertionFailure ¶
Error when an assertion failure occurs.
func BytesChangeMustBeWithNumericTypesOnly ¶
func BytesChangeMustBeWithNumericTypesOnly() error
Error message used when changing a byte array with wrong data type.
func CannotDeriveFromValue ¶
Error produced when trying to deriving properties and methods from a non-Struct value.
func DebugModule ¶
DebugModule runs the given Vida script in step by step computation fashion.
func ExpectedCallableValueInDeferError ¶
Error when expected a callable value.
func ExpectedIterableValueError ¶
Error when expected an iterable value.
func ExpectedListToSpreadError ¶
Error when a unpackable value was expected.
func ExpectedTypeAndGotOtherType ¶
Error when another value was expected.
func ExpectedUnpackableValueError ¶
Error when a unpackable value was expected.
func IndexOutOfRangeError ¶
Error messages for data structure subscriptions.
func InstancesDoNotSupportSubscriptionWriting ¶
func InstancesDoNotSupportSubscriptionWriting() error
Error message for subscription operations in instances.
func IsNotMethodProperty ¶
Error when a method or property was not found.
func LoadModule ¶
LoadModule loads a script file and returns a buffer of bytes.
func MethodNotDefined ¶
Method not defined error.
func MethodNotOverloaded ¶
Error when not found overloaded some method.
func NameNotDefinedInCompoundDataType ¶
Error messages for selection operations.
func NegativeShiftError ¶
func NeverShouldHaveHappened ¶
Error message used when an unknown flag is used for subscription or selection operations. This error never should have happened.
func OperatorNotDefined ¶
Error when an operator is not defined for some data type.
func OverloadedOperatorWithWrongArity ¶
Error when an instance overloaded __next operator with wrong arity.
func RangeExpectedIntegerValue ¶
Error when step range is negative.
func RangeExpectedPositiveValue ¶
Error when step range is negative.
func RangeExpressionError ¶
Error when range expression error.
func RecordPropertyError ¶
Error message when using a non-string value as key in a record.
func RuneOutOfRangeOrIllegal ¶
func RuneOutOfRangeOrIllegal() error
Error when rune is out of range or it is illegal.
func SelectionOperationNotSupported ¶
Error messages for values that does not support selector operator (.).
func TimeModule ¶
TimeModule runs the given Vida Script
func TypeErrorInBinaryOperator ¶
Error messages for type errors in binary operations.
func TypeErrorInPrefixOperator ¶
Error message for type errors in unary operations.
func UnpackCountDoesNotMatchError ¶
func UnpackCountDoesNotMatchError() error
Error when unpacking values.
func ValueDoesNotSupportExtension ¶
Error produced when trying to extend a non-Struct Value.
func ValueDoesNotSupportSlicing ¶
Error when type does not support slicing.
func ValueDoesNotSupportSubscription ¶
Error message when using a value that does not support subscription operations [].
func ValueIsImmutable ¶
Error message used when trying to mutate an immutable value.
func ValueIsNotAnIndexError ¶
Error message when using a value that cannot be an index.
func ValueIsNotValueSemantics ¶
Error when type does not support value semantics.
func ValueNotHashableError ¶
Error message when using a value not hashable as key in a map or a set.
func VarArgArityError ¶
Error when a method or property was not found.
func VariableAlreadyDefined ¶
Error when declaring a declared variable.
func VariableNotDefined ¶
Error when changing the value of a not-declared variable.
func VidaFprint ¶
Fprint formats using the default formats for its operands and writes to w. Spaces are added between operands when neither is a string. It returns the number of bytes written and any write error encountered.
func VidaFprintf ¶
Fprintf formats according to a format specifier and writes to w. It returns the number of bytes written and any write error encountered.
func VidaFprintln ¶
Fprintln formats using the default formats for its operands and writes to w. Spaces are always added between operands and a newline is appended. It returns the number of bytes written and any write error encountered.
func VidaPrintf ¶
Printf formats according to a format specifier and writes to standard output. It returns the number of bytes written and any write error encountered.
func VidaSprint ¶
Sprint formats using the default formats for its operands and returns the resulting string. Spaces are added between operands when neither is a string.
func VidaSprintf ¶
Sprintf formats according to a format specifier and returns the resulting string.
func VidaSprintln ¶
Sprintln formats using the default formats for its operands and returns the resulting string. Spaces are always added between operands and a newline is appended.
Types ¶
type BInt ¶
BInt models an arbitrary precision singned integer.
func (*BInt) Description ¶
func (*BInt) HasMethods ¶
func (*BInt) IsHashable ¶
func (*BInt) IsIterable ¶
func (*BInt) IsValueSemantics ¶
func (*BInt) MakeHashKey ¶
func (*BInt) MakeIterator ¶
type Bool ¶
type Bool bool
Bool models binary boolean values true, false
func (Bool) Description ¶
func (Bool) HasMethods ¶
func (Bool) IsHashable ¶
func (Bool) IsIterable ¶
func (Bool) IsValueSemantics ¶
func (Bool) MakeHashKey ¶
func (Bool) MakeIterator ¶
type Byte ¶
type Byte byte
Byte models raw machine Bytes or unisgned integers of 8 bits.
func (Byte) Description ¶
func (Byte) HasMethods ¶
func (Byte) IsHashable ¶
func (Byte) IsIterable ¶
func (Byte) IsValueSemantics ¶
func (Byte) MakeHashKey ¶
func (Byte) MakeIterator ¶
type Bytecode ¶
type Bytecode = uint32
Interpreter global type aliases.
const ( OPConst Bytecode = iota OPTrue OPFalse OPNil OPClosure OPStruct OPExtension OPDerive OPBinop OPEqual OPNotEqual OPNilChoice OPList OPMap OPRecord OPConstNamespace OPSubscript OPSelect OPPrefix OPNewGlobal OPGetGlobal OPSetGlobal OPCompSetGlobal OPGetLocal OPSetLocal OPCompSetLocal OPMutDataStructure OPCompMutDataStructure OPGetFreeVariable OPSetFreeVariable OPCompSetFreeVariable OPFreeVariable OPJumpIfFalse OPGoto OPRange OPNext OPMatch OPCall OPDefer OPDeferInvoke OPRunDefer OPReturn OPUnpack OPUnpackFor OPInvokeMethod OPAppend OPPop OPEnd )
Opcodes for the VM.
type Bytes ¶
type Bytes struct {
Value []byte
}
Bytes models a dynamic mutable array of bytes.
func (*Bytes) Description ¶
func (*Bytes) HasMethods ¶
func (*Bytes) IsHashable ¶
func (*Bytes) IsIterable ¶
func (*Bytes) IsValueSemantics ¶
func (*Bytes) MakeHashKey ¶
func (*Bytes) MakeIterator ¶
func (*Bytes) SubscriptGet ¶
Interface subscript operator.
func (*Bytes) SubscriptSet ¶
type BytesIterator ¶
BytesIterator is an object to iterate over bytes buffers and returns an item or a tuple (idx, val).
func NewBytesIterator ¶
func NewBytesIterator(bytes *Bytes, isrange bool) *BytesIterator
func (*BytesIterator) BinaryOp ¶
func (iter *BytesIterator) BinaryOp(op byte, rhs Value) (Value, error)
func (*BytesIterator) Clone ¶
func (iter *BytesIterator) Clone() Value
func (*BytesIterator) Description ¶
func (iter *BytesIterator) Description() string
func (*BytesIterator) Equals ¶
func (iter *BytesIterator) Equals(other Value) bool
func (*BytesIterator) Exhausted ¶
func (iter *BytesIterator) Exhausted() bool
func (*BytesIterator) GetMethod ¶
func (iter *BytesIterator) GetMethod(name string) (Value, bool, error)
func (*BytesIterator) HasMethods ¶
func (iter *BytesIterator) HasMethods() bool
func (*BytesIterator) IsHashable ¶
func (iter *BytesIterator) IsHashable() bool
func (*BytesIterator) IsIterable ¶
func (iter *BytesIterator) IsIterable() bool
func (*BytesIterator) IsValueSemantics ¶
func (iter *BytesIterator) IsValueSemantics() bool
func (*BytesIterator) MakeHashKey ¶
func (iter *BytesIterator) MakeHashKey() HashKey
func (*BytesIterator) MakeIterator ¶
func (iter *BytesIterator) MakeIterator() Iterator
func (*BytesIterator) Next ¶
func (iter *BytesIterator) Next() Value
type Closure ¶
type Closure struct { Function *Function // The function this closure has. FreeVars []Value // The run time free variables linked to this closure. StructID UInt // In case the function can access private state, this is the run time structu id linked to. }
Closure is the run time representation of a function with its own captured environment.
func (Closure) Description ¶
func (Closure) HasMethods ¶
func (Closure) IsHashable ¶
func (Closure) IsIterable ¶
func (Closure) IsValueSemantics ¶
func (Closure) MakeHashKey ¶
func (Closure) MakeIterator ¶
type Complex ¶
type Complex complex128
Type Complex models complex numbers of 128 bits.
func (Complex) Description ¶
func (Complex) HasMethods ¶
func (Complex) IsHashable ¶
func (Complex) IsIterable ¶
func (Complex) IsValueSemantics ¶
func (Complex) MakeHashKey ¶
func (Complex) MakeIterator ¶
type Fiber ¶
type Fiber struct {
// contains filtered or unexported fields
}
Fiber is the basic unit of execution and model a computational sequential process.
func (Fiber) Description ¶
func (*Fiber) HasMethods ¶
func (*Fiber) IsHashable ¶
func (*Fiber) IsIterable ¶
func (*Fiber) IsValueSemantics ¶
func (*Fiber) MakeHashKey ¶
func (*Fiber) MakeIterator ¶
type Float ¶
type Float float64
Float models a double precision floating-point number IEEE-754 of 64 bits.
func (Float) Description ¶
func (Float) HasMethods ¶
func (Float) IsHashable ¶
func (Float) IsIterable ¶
func (Float) IsValueSemantics ¶
func (Float) MakeHashKey ¶
func (Float) MakeIterator ¶
type Frame ¶
type Frame struct {
// contains filtered or unexported fields
}
Frame is a structure to support function calls and preserve its state.
type Function ¶
type Function struct { Name string // The name of the function. Arity UInt32 // The arity of the function. Vararg bool // The function can receive an arbitrary number of args. FreeVarCount Bytecode // Count of free variables. Code []Bytecode // The Bytecode of the function. Lines map[UInt32]UInt32 // A map between Bytecode to number lines. Constants []Value // The constant list of values of the function. ModuleName string // The module in this function has been defined. CanAccessPrivateState bool // The function can access private state of an instance. }
Function models the static representation of callable, executable code.
func (Function) Description ¶
func (Function) HasMethods ¶
func (Function) IsHashable ¶
func (Function) IsIterable ¶
func (Function) IsValueSemantics ¶
func (Function) MakeHashKey ¶
func (Function) MakeIterator ¶
type GFunction ¶
GFunction is a Value that represents a function written in Go that can be run for the Vida VM.
func (GFunction) Description ¶
func (GFunction) HasMethods ¶
func (GFunction) IsHashable ¶
func (GFunction) IsIterable ¶
func (GFunction) IsValueSemantics ¶
func (GFunction) MakeHashKey ¶
func (GFunction) MakeIterator ¶
type GModule ¶
GModule is the data structure to models an importable named environment written in Go.
func (GModule) Description ¶
func (GModule) HasMethods ¶
func (GModule) IsHashable ¶
func (GModule) IsIterable ¶
func (GModule) IsValueSemantics ¶
func (GModule) MakeHashKey ¶
func (GModule) MakeIterator ¶
func (GModule) SelectorGet ¶
Interface SelectorOperator. GModule implements only get becuase it is an immutable Value.
type Global ¶
type Global struct {
// contains filtered or unexported fields
}
Global is the unique shared state accesible for every fiber and for every module.
type HashKey ¶
HashKey models a key for a Map and Set collections.
func (HashKey) Description ¶
func (HashKey) HasMethods ¶
func (HashKey) IsHashable ¶
func (HashKey) IsIterable ¶
func (HashKey) IsValueSemantics ¶
func (HashKey) MakeHashKey ¶
func (HashKey) MakeIterator ¶
type IStop ¶
type IStop byte
Type IStop is a type for signaling the exhaustation of iterators.
func (IStop) Description ¶
func (IStop) HasMethods ¶
func (IStop) IsHashable ¶
func (IStop) IsIterable ¶
func (IStop) IsValueSemantics ¶
func (IStop) MakeHashKey ¶
func (IStop) MakeIterator ¶
type Importable ¶
Importable is the common interface for GModules and VModules.
type Instance ¶
Instance models unique objects instances of some structured data types.
func (Instance) Description ¶
func (Instance) HasMethods ¶
func (Instance) IsHashable ¶
func (Instance) IsIterable ¶
func (Instance) IsValueSemantics ¶
func (Instance) MakeHashKey ¶
func (Instance) MakeIterator ¶
func (Instance) SelectorGet ¶
Interface SelectorOperator.
func (Instance) SelectorSet ¶
func (Instance) SubscriptGet ¶
Interface subscript operator.
func (Instance) SubscriptSet ¶
type Int ¶
type Int int64
Int models a signed integer of 64 bits machine independent.
func (Int) Description ¶
func (Int) HasMethods ¶
func (Int) IsHashable ¶
func (Int) IsIterable ¶
func (Int) IsValueSemantics ¶
func (Int) MakeHashKey ¶
func (Int) MakeIterator ¶
type IntegerNumber ¶
type IntegerNumber interface {
ToInt() Int
}
IntegerNumber is the common interface for numeric values used as indexes in List, Strings or Bytes: Int, UInt, Byte and BInt.
type LibLoader ¶
type LibLoader func() Importable
LibLoader is a function when called produces and returns a GModule.
type List ¶
type List struct {
Elements []Value
}
List is an indexed-ordered random-access linear collection of values.
func (*List) Description ¶
func (*List) HasMethods ¶
func (*List) IsHashable ¶
func (*List) IsIterable ¶
func (*List) IsValueSemantics ¶
func (*List) MakeHashKey ¶
func (*List) MakeIterator ¶
func (*List) SubscriptGet ¶
Interface subscript operator.
func (*List) SubscriptSet ¶
type ListIterator ¶
ListIterator is an object to iterate over lists and returns an item or a tuple (idx, val).
func NewListIterator ¶
func NewListIterator(list *List, isrange bool) *ListIterator
func (*ListIterator) BinaryOp ¶
func (iter *ListIterator) BinaryOp(op byte, rhs Value) (Value, error)
func (*ListIterator) Clone ¶
func (iter *ListIterator) Clone() Value
func (*ListIterator) Description ¶
func (iter *ListIterator) Description() string
func (*ListIterator) Equals ¶
func (iter *ListIterator) Equals(other Value) bool
func (*ListIterator) Exhausted ¶
func (iter *ListIterator) Exhausted() bool
func (*ListIterator) GetMethod ¶
func (iter *ListIterator) GetMethod(name string) (Value, bool, error)
func (*ListIterator) HasMethods ¶
func (iter *ListIterator) HasMethods() bool
func (*ListIterator) IsHashable ¶
func (iter *ListIterator) IsHashable() bool
func (*ListIterator) IsIterable ¶
func (iter *ListIterator) IsIterable() bool
func (*ListIterator) IsValueSemantics ¶
func (iter *ListIterator) IsValueSemantics() bool
func (*ListIterator) MakeHashKey ¶
func (iter *ListIterator) MakeHashKey() HashKey
func (*ListIterator) MakeIterator ¶
func (iter *ListIterator) MakeIterator() Iterator
func (*ListIterator) Next ¶
func (iter *ListIterator) Next() Value
type Map ¶
Map is a hash table or dictionary.
func (Map) Description ¶
func (Map) HasMethods ¶
func (Map) IsHashable ¶
func (Map) IsIterable ¶
func (Map) IsValueSemantics ¶
func (Map) MakeHashKey ¶
func (Map) MakeIterator ¶
func (Map) SubscriptGet ¶
Interface subscription operator.
func (Map) SubscriptSet ¶
type MapIterator ¶
MapIterator is an object to iterate over maps.
func NewMapIterator ¶
func NewMapIterator(mmap Map, isrange bool) *MapIterator
func (*MapIterator) Clone ¶
func (iter *MapIterator) Clone() Value
func (*MapIterator) Description ¶
func (iter *MapIterator) Description() string
func (*MapIterator) Equals ¶
func (iter *MapIterator) Equals(other Value) bool
func (*MapIterator) Exhausted ¶
func (iter *MapIterator) Exhausted() bool
func (*MapIterator) GetMethod ¶
func (iter *MapIterator) GetMethod(name string) (Value, bool, error)
func (*MapIterator) HasMethods ¶
func (iter *MapIterator) HasMethods() bool
func (*MapIterator) IsHashable ¶
func (iter *MapIterator) IsHashable() bool
func (*MapIterator) IsIterable ¶
func (iter *MapIterator) IsIterable() bool
func (*MapIterator) IsValueSemantics ¶
func (iter *MapIterator) IsValueSemantics() bool
func (*MapIterator) MakeHashKey ¶
func (iter *MapIterator) MakeHashKey() HashKey
func (*MapIterator) MakeIterator ¶
func (iter *MapIterator) MakeIterator() Iterator
func (*MapIterator) Next ¶
func (iter *MapIterator) Next() Value
type NamedConstants ¶
NamedConstants models small namespace of constant values. Those values must have value semantics.
func (NamedConstants) BinaryOp ¶
func (constants NamedConstants) BinaryOp(op byte, rhs Value) (Value, error)
func (NamedConstants) Clone ¶
func (constants NamedConstants) Clone() Value
func (NamedConstants) Description ¶
func (constants NamedConstants) Description() string
func (NamedConstants) Equals ¶
func (constants NamedConstants) Equals(other Value) bool
func (NamedConstants) GetMethod ¶
func (constants NamedConstants) GetMethod(name string) (Value, bool, error)
func (NamedConstants) HasMethods ¶
func (constants NamedConstants) HasMethods() bool
func (NamedConstants) IsHashable ¶
func (constants NamedConstants) IsHashable() bool
func (NamedConstants) IsIterable ¶
func (constants NamedConstants) IsIterable() bool
func (NamedConstants) IsValueSemantics ¶
func (constants NamedConstants) IsValueSemantics() bool
func (NamedConstants) MakeHashKey ¶
func (constants NamedConstants) MakeHashKey() HashKey
func (NamedConstants) MakeIterator ¶
func (constants NamedConstants) MakeIterator() Iterator
func (NamedConstants) SelectorGet ¶
func (constants NamedConstants) SelectorGet(field string) (Value, error)
Interface SelectorOperator. NamedConstants implements only get becuase it is an immutable Value.
func (NamedConstants) SelectorSet ¶
func (constants NamedConstants) SelectorSet(string, Value) error
type Nil ¶
type Nil byte
Nil is the value representing the absence of value.
func (Nil) Description ¶
func (Nil) HasMethods ¶
func (Nil) IsHashable ¶
func (Nil) IsIterable ¶
func (Nil) IsValueSemantics ¶
func (Nil) MakeHashKey ¶
func (Nil) MakeIterator ¶
type NumericIterator ¶
NumericIterator is the iterator over a range of integers.
func NewRange ¶
func NewRange(value, end, step Int, towardsRight Bool) *NumericIterator
func (*NumericIterator) BinaryOp ¶
func (iter *NumericIterator) BinaryOp(op byte, rhs Value) (Value, error)
func (*NumericIterator) Clone ¶
func (iter *NumericIterator) Clone() Value
func (*NumericIterator) Description ¶
func (iter *NumericIterator) Description() string
func (*NumericIterator) Equals ¶
func (iter *NumericIterator) Equals(other Value) bool
func (*NumericIterator) Exhausted ¶
func (iter *NumericIterator) Exhausted() bool
func (*NumericIterator) GetMethod ¶
func (iter *NumericIterator) GetMethod(name string) (Value, bool, error)
func (*NumericIterator) HasMethods ¶
func (iter *NumericIterator) HasMethods() bool
func (*NumericIterator) IsHashable ¶
func (iter *NumericIterator) IsHashable() bool
func (*NumericIterator) IsIterable ¶
func (iter *NumericIterator) IsIterable() bool
func (*NumericIterator) IsValueSemantics ¶
func (iter *NumericIterator) IsValueSemantics() bool
func (*NumericIterator) MakeHashKey ¶
func (iter *NumericIterator) MakeHashKey() HashKey
func (*NumericIterator) MakeIterator ¶
func (iter *NumericIterator) MakeIterator() Iterator
func (*NumericIterator) Next ¶
func (iter *NumericIterator) Next() Value
type Pair ¶
type Pair struct {
// contains filtered or unexported fields
}
Pair is a helper struct to hold keys and values as return value when iterating over maps and records.
func (Pair) Description ¶
func (Pair) HasMethods ¶
func (Pair) IsHashable ¶
func (Pair) IsIterable ¶
func (Pair) IsValueSemantics ¶
func (Pair) MakeHashKey ¶
func (Pair) MakeIterator ¶
func (Pair) SelectorGet ¶
Interface SelectorOperator. Pair implements only get becuase it is an immutable Value.
type Rational ¶
Rational models an arbitrary precision rational number.
func (*Rational) Description ¶
func (*Rational) HasMethods ¶
func (*Rational) IsHashable ¶
func (*Rational) IsIterable ¶
func (*Rational) IsValueSemantics ¶
func (*Rational) MakeHashKey ¶
func (*Rational) MakeIterator ¶
type Record ¶
type Record struct {
Properties Namespace
}
Record is a non-ordered structured {property:value} data type.
func (Record) Description ¶
func (Record) HasMethods ¶
func (Record) IsHashable ¶
func (Record) IsIterable ¶
func (Record) IsValueSemantics ¶
func (Record) MakeHashKey ¶
func (Record) MakeIterator ¶
func (Record) SelectorGet ¶
Interface SelectorOperator.
func (Record) SubscriptGet ¶
Interface Subscript Operator.
func (Record) SubscriptSet ¶
type RecordIterator ¶
func NewRecordIterator ¶
func NewRecordIterator(record Record, isrange bool) *RecordIterator
func (*RecordIterator) BinaryOp ¶
func (iter *RecordIterator) BinaryOp(op byte, rhs Value) (Value, error)
func (*RecordIterator) Clone ¶
func (iter *RecordIterator) Clone() Value
func (*RecordIterator) Description ¶
func (iter *RecordIterator) Description() string
func (*RecordIterator) Equals ¶
func (iter *RecordIterator) Equals(other Value) bool
func (*RecordIterator) Exhausted ¶
func (iter *RecordIterator) Exhausted() bool
func (*RecordIterator) GetMethod ¶
func (iter *RecordIterator) GetMethod(name string) (Value, bool, error)
func (*RecordIterator) HasMethods ¶
func (iter *RecordIterator) HasMethods() bool
func (*RecordIterator) IsHashable ¶
func (iter *RecordIterator) IsHashable() bool
func (*RecordIterator) IsIterable ¶
func (iter *RecordIterator) IsIterable() bool
func (*RecordIterator) IsValueSemantics ¶
func (iter *RecordIterator) IsValueSemantics() bool
func (*RecordIterator) MakeHashKey ¶
func (iter *RecordIterator) MakeHashKey() HashKey
func (*RecordIterator) MakeIterator ¶
func (iter *RecordIterator) MakeIterator() Iterator
func (*RecordIterator) Next ¶
func (iter *RecordIterator) Next() Value
type Repl ¶
type Repl struct {
// contains filtered or unexported fields
}
Repl models an iterative updated computation structure.
type Result ¶
Result models the result of computations that could fail.
func (Result) Description ¶
func (Result) HasMethods ¶
func (Result) IsHashable ¶
func (Result) IsIterable ¶
func (Result) IsValueSemantics ¶
func (Result) MakeHashKey ¶
func (Result) MakeIterator ¶
func (Result) SelectorGet ¶
Interface SelectorOperator. Result implements only get becuase it is an immutable Value.
type Rune ¶
type Rune rune
Rune models a unicode codepoint value.
func (Rune) Description ¶
func (Rune) HasMethods ¶
func (Rune) IsHashable ¶
func (Rune) IsIterable ¶
func (Rune) IsValueSemantics ¶
func (Rune) MakeHashKey ¶
func (Rune) MakeIterator ¶
type SelectorOperable ¶
type SelectorOperable interface { SelectorGet(string) (Value, error) SelectorSet(string, Value) error }
SelectorOperable interface for Values implementing operator selector (value '.' property)
type Set ¶
Set is a collection of unique values.
func (Set) Description ¶
func (Set) HasMethods ¶
func (Set) IsHashable ¶
func (Set) IsIterable ¶
func (Set) IsValueSemantics ¶
func (Set) MakeHashKey ¶
func (Set) MakeIterator ¶
type SetIterator ¶
SetIterator is an objecto to iterate over sets.
func NewSetIterator ¶
func NewSetIterator(set Set, isrange bool) *SetIterator
func (*SetIterator) Clone ¶
func (iter *SetIterator) Clone() Value
func (*SetIterator) Description ¶
func (iter *SetIterator) Description() string
func (*SetIterator) Equals ¶
func (iter *SetIterator) Equals(other Value) bool
func (*SetIterator) Exhausted ¶
func (iter *SetIterator) Exhausted() bool
func (*SetIterator) GetMethod ¶
func (iter *SetIterator) GetMethod(name string) (Value, bool, error)
func (*SetIterator) HasMethods ¶
func (iter *SetIterator) HasMethods() bool
func (*SetIterator) IsHashable ¶
func (iter *SetIterator) IsHashable() bool
func (*SetIterator) IsIterable ¶
func (iter *SetIterator) IsIterable() bool
func (*SetIterator) IsValueSemantics ¶
func (iter *SetIterator) IsValueSemantics() bool
func (*SetIterator) MakeHashKey ¶
func (iter *SetIterator) MakeHashKey() HashKey
func (*SetIterator) MakeIterator ¶
func (iter *SetIterator) MakeIterator() Iterator
func (*SetIterator) Next ¶
func (iter *SetIterator) Next() Value
type SliceOperable ¶
type SliceOperable interface { SliceGet(UInt32, Value, Value) (Value, error) SliceSet(UInt32, Value, Value, Value) error }
SliceOperable interface for Values implementing slice operator subscript (value '[e:e]' | '[e:]' | '[:e]' | '[:]')
type String ¶
func (*String) Description ¶
func (*String) HasMethods ¶
func (*String) IsHashable ¶
func (*String) IsIterable ¶
func (*String) IsValueSemantics ¶
func (*String) MakeHashKey ¶
func (*String) MakeIterator ¶
func (*String) SubscriptGet ¶
Interface SubscriptOperable.
func (*String) SubscriptSet ¶
type StringIterator ¶
String iterator is an object to iterate over runes in strings.
func NewStringIterator ¶
func NewStringIterator(str *String, isrange bool) *StringIterator
func (*StringIterator) BinaryOp ¶
func (iter *StringIterator) BinaryOp(op byte, rhs Value) (Value, error)
func (*StringIterator) Clone ¶
func (iter *StringIterator) Clone() Value
func (*StringIterator) Description ¶
func (iter *StringIterator) Description() string
func (*StringIterator) Equals ¶
func (iter *StringIterator) Equals(other Value) bool
func (*StringIterator) Exhausted ¶
func (iter *StringIterator) Exhausted() bool
func (*StringIterator) GetMethod ¶
func (iter *StringIterator) GetMethod(name string) (Value, bool, error)
func (*StringIterator) HasMethods ¶
func (iter *StringIterator) HasMethods() bool
func (*StringIterator) IsHashable ¶
func (iter *StringIterator) IsHashable() bool
func (*StringIterator) IsIterable ¶
func (iter *StringIterator) IsIterable() bool
func (*StringIterator) IsValueSemantics ¶
func (iter *StringIterator) IsValueSemantics() bool
func (*StringIterator) MakeHashKey ¶
func (iter *StringIterator) MakeHashKey() HashKey
func (*StringIterator) MakeIterator ¶
func (iter *StringIterator) MakeIterator() Iterator
func (*StringIterator) Next ¶
func (iter *StringIterator) Next() Value
type Struct ¶
Struct is the stencil or blueprint of a new user-defined structured data type.
func (Struct) Description ¶
func (Struct) HasMethods ¶
func (Struct) IsHashable ¶
func (Struct) IsIterable ¶
func (Struct) IsValueSemantics ¶
func (Struct) MakeHashKey ¶
func (Struct) MakeIterator ¶
func (Struct) SelectorGet ¶
Interface SelectorOperator. Struct implements only get becuase it is an immutable Value.
type SubscriptOperable ¶
type SubscriptOperable interface { SubscriptGet(Value) (Value, error) SubscriptSet(Value, Value) error }
SubscriptOperable interface for Values implementing operator subscript (value '[expr]')
type Tuple ¶
type Tuple struct {
// contains filtered or unexported fields
}
Tuple is a helper struct to hold indexes and values as return value when iterating over lists and strings.
func (Tuple) Description ¶
func (Tuple) HasMethods ¶
func (Tuple) IsHashable ¶
func (Tuple) IsIterable ¶
func (Tuple) IsValueSemantics ¶
func (Tuple) MakeHashKey ¶
func (Tuple) MakeIterator ¶
func (Tuple) SelectorGet ¶
Interface SelectorOperator. Tuple implements only get becuase it is an immutable Value.
type UInt ¶
type UInt uint64
Type UInt models unsigned inteters of 64 bits machine independent.
func (UInt) Description ¶
func (UInt) HasMethods ¶
func (UInt) IsHashable ¶
func (UInt) IsIterable ¶
func (UInt) IsValueSemantics ¶
func (UInt) MakeHashKey ¶
func (UInt) MakeIterator ¶
type VModule ¶
type VModule struct {
// contains filtered or unexported fields
}
VModule models a Vida file with its compiled sorce code which is equivalent to a Vida module.
func (*VModule) Description ¶
func (*VModule) HasMethods ¶
func (*VModule) IsHashable ¶
func (*VModule) IsIterable ¶
func (*VModule) IsValueSemantics ¶
func (*VModule) MakeHashKey ¶
func (*VModule) MakeIterator ¶
func (*VModule) SelectorGet ¶
Interface SelectorOperator. VModule implements only get becuase it is an immutable Value.
type Value ¶
type Value interface { TypeName() string Description() string Equals(Value) bool BinaryOp(byte, Value) (Value, error) PrefixOp(byte) (Value, error) IsIterable() bool MakeIterator() Iterator IsHashable() bool MakeHashKey() HashKey IsValueSemantics() bool HasMethods() bool GetMethod(string) (Value, bool, error) Clone() Value }
Value interface models the inteface for all Vida Values.
func FiberCurrent ¶
Returns the current running a.k.a. resumed fiber.
func FiberIsAlive ¶
Checks if a fiber is alive or terminated.
func FiberParent ¶
Returns the current running a.k.a. resumed fiber's caller fiber.
func FiberPrintStack ¶
Prints the stack trace for a given fiber.
func FiberRecycle ¶
func FiberState ¶
func FiberSuspend ¶
Suspends the fiber in which it is called and returns some value to the caller fiber. A.k.a. fiber yield.