Documentation
¶
Index ¶
- type Bool
- func (o *Bool) Add(rs Object) (Object, error)
- func (o *Bool) BinaryOp(op int, rhs Object) (Object, error)
- func (o *Bool) Div(rs Object) (Object, error)
- func (o *Bool) Equal(rs Object) (Object, error)
- func (o *Bool) GetValue() any
- func (o *Bool) Gt(rs Object) (Object, error)
- func (o *Bool) GtEq(rs Object) (Object, error)
- func (o *Bool) LogicalAnd(rs Object) (Object, error)
- func (o *Bool) LogicalNot() (Object, error)
- func (o *Bool) LogicalOr(rs Object) (Object, error)
- func (o *Bool) Lt(rs Object) (Object, error)
- func (o *Bool) LtEq(rs Object) (Object, error)
- func (o *Bool) Mod(rs Object) (Object, error)
- func (o *Bool) Mul(rs Object) (Object, error)
- func (o *Bool) Negative() (Object, error)
- func (o *Bool) NotEqual(rs Object) (Object, error)
- func (o *Bool) Pow(rs Object) (Object, error)
- func (o *Bool) String() string
- func (o *Bool) Sub(rs Object) (Object, error)
- func (o *Bool) TypeName() string
- func (o *Bool) UnaryOp(op int) (Object, error)
- func (o *Bool) Value() bool
- func (o *Bool) Xor(rs Object) (Object, error)
- type Dict
- func (o *Dict) BinaryOp(op int, rhs Object) (Object, error)
- func (o *Dict) Equal(rs Object) (Object, error)
- func (o *Dict) GetValue() any
- func (o *Dict) IndexGet(rs Object) (Object, error)
- func (o *Dict) IndexSet(idx Object, rs Object) error
- func (o *Dict) LogicalAnd(rs Object) (Object, error)
- func (o *Dict) LogicalNot() (Object, error)
- func (o *Dict) LogicalOr(rs Object) (Object, error)
- func (o *Dict) MethodCall(name string, args ...Object) (Object, error)
- func (o *Dict) MethodLen(args ...Object) (Object, error)
- func (o *Dict) MethodPop(args ...Object) (Object, error)
- func (o *Dict) NotEqual(rs Object) (Object, error)
- func (o *Dict) String() string
- func (o *Dict) TypeName() string
- func (o *Dict) UnaryOp(op int) (Object, error)
- func (o *Dict) Value() map[string]Object
- type Float
- func (o *Float) Add(rs Object) (Object, error)
- func (o *Float) BinaryOp(op int, rhs Object) (Object, error)
- func (o *Float) Div(rs Object) (Object, error)
- func (o *Float) Equal(rs Object) (Object, error)
- func (o *Float) GetValue() any
- func (o *Float) Gt(rs Object) (Object, error)
- func (o *Float) GtEq(rs Object) (Object, error)
- func (o *Float) LogicalAnd(rs Object) (Object, error)
- func (o *Float) LogicalNot() (Object, error)
- func (o *Float) LogicalOr(rs Object) (Object, error)
- func (o *Float) Lt(rs Object) (Object, error)
- func (o *Float) LtEq(rs Object) (Object, error)
- func (o *Float) Mod(rs Object) (Object, error)
- func (o *Float) Mul(rs Object) (Object, error)
- func (o *Float) Negative() (Object, error)
- func (o *Float) NotEqual(rs Object) (Object, error)
- func (o *Float) Pow(rs Object) (Object, error)
- func (o *Float) String() string
- func (o *Float) Sub(rs Object) (Object, error)
- func (o *Float) TypeName() string
- func (o *Float) UnaryOp(op int) (Object, error)
- func (o *Float) Value() float64
- type Int
- func (o *Int) Add(rs Object) (Object, error)
- func (o *Int) BinaryOp(op int, rhs Object) (Object, error)
- func (o *Int) Div(rs Object) (Object, error)
- func (o *Int) Equal(rs Object) (Object, error)
- func (o *Int) GetValue() any
- func (o *Int) Gt(rs Object) (Object, error)
- func (o *Int) GtEq(rs Object) (Object, error)
- func (o *Int) LogicalAnd(rs Object) (Object, error)
- func (o *Int) LogicalNot() (Object, error)
- func (o *Int) LogicalOr(rs Object) (Object, error)
- func (o *Int) Lt(rs Object) (Object, error)
- func (o *Int) LtEq(rs Object) (Object, error)
- func (o *Int) Mod(rs Object) (Object, error)
- func (o *Int) Mul(rs Object) (Object, error)
- func (o *Int) Negative() (Object, error)
- func (o *Int) NotEqual(rs Object) (Object, error)
- func (o *Int) Pow(rs Object) (Object, error)
- func (o *Int) String() string
- func (o *Int) Sub(rs Object) (Object, error)
- func (o *Int) TypeName() string
- func (o *Int) UnaryOp(op int) (Object, error)
- func (o *Int) Value() int64
- func (o *Int) Xor(rs Object) (Object, error)
- type List
- func (o *List) Add(rs Object) (Object, error)
- func (o *List) BinaryOp(op int, rhs Object) (Object, error)
- func (o *List) Equal(rs Object) (Object, error)
- func (o *List) GetValue() any
- func (o *List) IndexGet(rs Object) (Object, error)
- func (o *List) IndexSet(idx Object, rs Object) error
- func (o *List) LogicalAnd(rs Object) (Object, error)
- func (o *List) LogicalNot() (Object, error)
- func (o *List) LogicalOr(rs Object) (Object, error)
- func (o *List) MethodAppend(args ...Object) (Object, error)
- func (o *List) MethodCall(name string, args ...Object) (Object, error)
- func (o *List) MethodLen(args ...Object) (Object, error)
- func (o *List) MethodPop(args ...Object) (Object, error)
- func (o *List) MethodReverse(args ...Object) (Object, error)
- func (o *List) Mul(rs Object) (Object, error)
- func (o *List) NotEqual(rs Object) (Object, error)
- func (o *List) String() string
- func (o *List) TypeName() string
- func (o *List) UnaryOp(op int) (Object, error)
- func (o *List) Value() []Object
- type NativeFunc
- type Null
- func (o *Null) BinaryOp(op int, rhs Object) (Object, error)
- func (o *Null) Equal(rs Object) (Object, error)
- func (o *Null) LogicalAnd(rs Object) (Object, error)
- func (o *Null) LogicalNot() (Object, error)
- func (o *Null) LogicalOr(rs Object) (Object, error)
- func (o *Null) NotEqual(rs Object) (Object, error)
- func (o *Null) String() string
- func (o *Null) TypeName() string
- func (o *Null) UnaryOp(op int) (Object, error)
- type Object
- type ObjectImpl
- func (a *ObjectImpl) Add(Object) (Object, error)
- func (o *ObjectImpl) BinaryOp(_ int, _ Object) (Object, error)
- func (o *ObjectImpl) Call(_ ...Object) (Object, error)
- func (o *ObjectImpl) CanCall() bool
- func (a *ObjectImpl) Div(Object) (Object, error)
- func (a *ObjectImpl) Equal(Object) (Object, error)
- func (o *ObjectImpl) GetValue() any
- func (a *ObjectImpl) Gt(Object) (Object, error)
- func (a *ObjectImpl) GtEq(Object) (Object, error)
- func (o *ObjectImpl) IndexGet(Object) (Object, error)
- func (o *ObjectImpl) IndexSet(Object, Object) error
- func (a *ObjectImpl) LogicalAnd(Object) (Object, error)
- func (a *ObjectImpl) LogicalNot() (Object, error)
- func (a *ObjectImpl) LogicalOr(Object) (Object, error)
- func (a *ObjectImpl) Lt(Object) (Object, error)
- func (a *ObjectImpl) LtEq(Object) (Object, error)
- func (o *ObjectImpl) MethodCall(string, ...Object) (Object, error)
- func (a *ObjectImpl) Mod(Object) (Object, error)
- func (a *ObjectImpl) Mul(Object) (Object, error)
- func (a *ObjectImpl) Negative() (Object, error)
- func (a *ObjectImpl) NotEqual(Object) (Object, error)
- func (a *ObjectImpl) Pow(Object) (Object, error)
- func (o *ObjectImpl) String() string
- func (a *ObjectImpl) Sub(Object) (Object, error)
- func (o *ObjectImpl) TypeName() string
- func (o *ObjectImpl) UnaryOp(_ int) (Object, error)
- func (a *ObjectImpl) Xor(Object) (Object, error)
- type RuntimeFunc
- func (o *RuntimeFunc) CanCall() bool
- func (o *RuntimeFunc) GetArgs() []string
- func (o *RuntimeFunc) GetArgsLen() int
- func (o *RuntimeFunc) GetCode() []parser.IStmtContext
- func (o *RuntimeFunc) GetName() string
- func (o *RuntimeFunc) SetName(name string)
- func (o *RuntimeFunc) String() string
- func (o *RuntimeFunc) TypeName() string
- type Str
- func (o *Str) Add(rs Object) (Object, error)
- func (o *Str) BinaryOp(op int, rhs Object) (Object, error)
- func (o *Str) Equal(rs Object) (Object, error)
- func (o *Str) GetValue() any
- func (o *Str) Gt(rs Object) (Object, error)
- func (o *Str) GtEq(rs Object) (Object, error)
- func (o *Str) IndexGet(rs Object) (Object, error)
- func (o *Str) IndexSet(idx Object, rs Object) error
- func (o *Str) LogicalAnd(rs Object) (Object, error)
- func (o *Str) LogicalNot() (Object, error)
- func (o *Str) LogicalOr(rs Object) (Object, error)
- func (o *Str) Lt(rs Object) (Object, error)
- func (o *Str) LtEq(rs Object) (Object, error)
- func (o *Str) MethodCall(name string, args ...Object) (Object, error)
- func (o *Str) MethodLen(args ...Object) (Object, error)
- func (o *Str) MethodReverse(args ...Object) (Object, error)
- func (o *Str) MethodSplit(args ...Object) (Object, error)
- func (o *Str) Mul(rs Object) (Object, error)
- func (o *Str) NotEqual(rs Object) (Object, error)
- func (o *Str) String() string
- func (o *Str) TypeName() string
- func (o *Str) UnaryOp(op int) (Object, error)
- func (o *Str) Value() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bool ¶
type Bool struct { ObjectImpl // contains filtered or unexported fields }
Bool implements ObjectImpl interfaces
func (*Bool) Equal ¶
Equal implements checking of equation between Bool object and other types of objects
func (*Bool) Gt ¶
Gt implements 'great than' checking between Bool object and other types of objects
func (*Bool) GtEq ¶
GtEq implements 'great than or equal' checking between Bool object and other types of objects
func (*Bool) LogicalAnd ¶
LogicalAnd implements logical AND between Bool object and other types of objects
func (*Bool) LogicalNot ¶
LogicalNot implements logical NOT on Bool object
func (*Bool) LogicalOr ¶
LogicalOr implements logical OR between Bool object and other types of objects
func (*Bool) LtEq ¶
LtEq implements 'less than or equal' checking between Bool object and other types of objects
func (*Bool) NotEqual ¶
NotEqual implements checking of unequation between Bool object and other types of objects
type Dict ¶
type Dict struct { ObjectImpl // contains filtered or unexported fields }
Dict implements ObjectImpl interfaces
func (*Dict) Equal ¶
Equal implements checking of equation between Dict object and other types of objects
func (*Dict) LogicalAnd ¶
LogicalAnd implements logical AND between Dict object and other types of objects
func (*Dict) LogicalNot ¶
LogicalNot implements logical NOT on Dict object
func (*Dict) LogicalOr ¶
LogicalOr implements logical OR between Dict object and other types of objects
func (*Dict) MethodCall ¶
MethodCall dispatch method from storage for Dict object and executes it
func (*Dict) NotEqual ¶
NotEqual implements checking of unequation between Dict object and other types of objects
type Float ¶
type Float struct { ObjectImpl // contains filtered or unexported fields }
Float implements ObjectImpl interfaces
func (*Float) Equal ¶
Equal implements checking of equation between Float object and other types of objects
func (*Float) Gt ¶
Gt implements 'great than' checking between Float object and other types of objects
func (*Float) GtEq ¶
GtEq implements 'great than or equal' checking between Float object and other types of objects
func (*Float) LogicalAnd ¶
LogicalAnd implements logical AND between Float object and other types of objects
func (*Float) LogicalNot ¶
LogicalNot implements logical NOT on Float object
func (*Float) LogicalOr ¶
LogicalOr implements logical OR between Float object and other types of objects
func (*Float) Lt ¶
Lt implements 'less than' checking between Float object and other types of objects
func (*Float) LtEq ¶
LtEq implements 'less than or equal' checking between Float object and other types of objects
func (*Float) NotEqual ¶
NotEqual implements checking of unequation between Float object and other types of objects
type Int ¶
type Int struct { ObjectImpl // contains filtered or unexported fields }
Int implements ObjectImpl interfaces
func (*Int) Equal ¶
Equal implements checking of equation between Int object and other types of objects
func (*Int) GtEq ¶
GtEq implements 'great than or equal' checking between Int object and other types of objects
func (*Int) LogicalAnd ¶
LogicalAnd implements logical AND between Int object and other types of objects
func (*Int) LogicalNot ¶
LogicalNot implements logical NOT on Int object
func (*Int) LogicalOr ¶
LogicalOr implements logical OR between Int object and other types of objects
func (*Int) LtEq ¶
LtEq implements 'less than or equal' checking between Int object and other types of objects
func (*Int) NotEqual ¶
NotEqual implements checking of unequation between Int object and other types of objects
type List ¶
type List struct { ObjectImpl // contains filtered or unexported fields }
List implements ObjectImpl interfaces
func (*List) Equal ¶
Equal implements checking of equation between List object and other types of objects
func (*List) LogicalAnd ¶
LogicalAnd implements logical AND between List object and other types of objects
func (*List) LogicalNot ¶
LogicalNot implements logical NOT on List object
func (*List) LogicalOr ¶
LogicalOr implements logical OR between List object and other types of objects
func (*List) MethodAppend ¶ added in v1.0.1
MethodPush append objects at the end of the list
func (*List) MethodCall ¶
MethodCall dispatch method from storage for List object and executes it
func (*List) MethodReverse ¶
MethodReverse reverses list objects via method
func (*List) NotEqual ¶
NotEqual implements checking of unequation between List object and other types of objects
type NativeFunc ¶
type NativeFunc struct { ObjectImpl // contains filtered or unexported fields }
NativeFunc implements ObjectImpl interfaces
func NewNativeFunc ¶
func NewNativeFunc(n string, c func(args ...Object) (Object, error)) *NativeFunc
NewNativeFunc creates new NativeFunc objects with name of function and native Golang function
func (*NativeFunc) Call ¶
func (o *NativeFunc) Call(args ...Object) (Object, error)
Call iinvoke native function using underlied Golang realization
func (*NativeFunc) CanCall ¶
func (o *NativeFunc) CanCall() bool
CanCall indicates if object is callable
func (*NativeFunc) String ¶
func (o *NativeFunc) String() string
String returns string representation of native function object
func (*NativeFunc) TypeName ¶
func (o *NativeFunc) TypeName() string
TypeName returns type name of native function and its name
type Null ¶
type Null struct {
ObjectImpl
}
Null implements ObjectImpl interface
func (*Null) Equal ¶
Equal implements checking of equation between Null object and other types of objects
func (*Null) LogicalAnd ¶
LogicalAnd implements logical AND between Null object and other types of objects
func (*Null) LogicalNot ¶
LogicalNot implements logical NOT on Null object
func (*Null) LogicalOr ¶
LogicalOr implements logical OR between Null object and other types of objects
func (*Null) NotEqual ¶
NotEqual implements checking of unequation between Null object and other types of objects
type Object ¶
type Object interface { // type name TypeName() string // string representation of object String() string BinaryOp(int, Object) (Object, error) UnaryOp(int) (Object, error) // is object callable CanCall() bool // call object with arguments Call(...Object) (Object, error) // call method of object MethodCall(string, ...Object) (Object, error) // get value GetValue() any // get value by index IndexGet(Object) (Object, error) // set value by index IndexSet(Object, Object) error // logical NOT LogicalNot() (Object, error) // logical OR LogicalOr(Object) (Object, error) // logical AND LogicalAnd(Object) (Object, error) // objects'es equality Equal(Object) (Object, error) // objects'es unequality NotEqual(Object) (Object, error) // unary negation Negative() (Object, error) // great than or equal GtEq(Object) (Object, error) // great than Gt(Object) (Object, error) // less than or equal LtEq(Object) (Object, error) // less than Lt(Object) (Object, error) // sum Add(Object) (Object, error) // subtractr Sub(Object) (Object, error) // pow Pow(Object) (Object, error) // multiplication Mul(Object) (Object, error) // division Div(Object) (Object, error) // obtain integer reminder Mod(Object) (Object, error) // xor Xor(Object) (Object, error) }
type ObjectImpl ¶
type ObjectImpl struct{}
func (*ObjectImpl) CanCall ¶
func (o *ObjectImpl) CanCall() bool
func (*ObjectImpl) GetValue ¶
func (o *ObjectImpl) GetValue() any
func (*ObjectImpl) LogicalAnd ¶
func (a *ObjectImpl) LogicalAnd(Object) (Object, error)
func (*ObjectImpl) LogicalNot ¶
func (a *ObjectImpl) LogicalNot() (Object, error)
func (*ObjectImpl) MethodCall ¶
func (o *ObjectImpl) MethodCall(string, ...Object) (Object, error)
func (*ObjectImpl) Negative ¶
func (a *ObjectImpl) Negative() (Object, error)
func (*ObjectImpl) String ¶
func (o *ObjectImpl) String() string
func (*ObjectImpl) TypeName ¶
func (o *ObjectImpl) TypeName() string
type RuntimeFunc ¶
type RuntimeFunc struct { ObjectImpl // contains filtered or unexported fields }
RuntimeFunc implements ObjectImpl interfaces
func NewRuntimeFunc ¶
func NewRuntimeFunc(args []string, code []parser.IStmtContext) *RuntimeFunc
NewRuntimeFunc creates new RuntimeFunc objects using arguments (args) and runtime statements array
func (*RuntimeFunc) CanCall ¶
func (o *RuntimeFunc) CanCall() bool
CanCall indicates if object is callable
func (*RuntimeFunc) GetArgs ¶
func (o *RuntimeFunc) GetArgs() []string
GetArgs return list of arguments for RuntimeFunc object
func (*RuntimeFunc) GetArgsLen ¶
func (o *RuntimeFunc) GetArgsLen() int
GetArgsLen returns length of arguments
func (*RuntimeFunc) GetCode ¶
func (o *RuntimeFunc) GetCode() []parser.IStmtContext
GetCode returns array of runtime PLAN statements
func (*RuntimeFunc) GetName ¶
func (o *RuntimeFunc) GetName() string
GetName returns name of runtime function
func (*RuntimeFunc) SetName ¶
func (o *RuntimeFunc) SetName(name string)
SetName set name of RuntimeFunc object
func (*RuntimeFunc) String ¶
func (o *RuntimeFunc) String() string
String returns string representation of runtime function object
func (*RuntimeFunc) TypeName ¶
func (o *RuntimeFunc) TypeName() string
TypeName returns type name of runtime function and its name
type Str ¶
type Str struct { ObjectImpl // contains filtered or unexported fields }
Str implements ObjectImpl interface
func (*Str) Equal ¶
Equal implements checking of equation between Str object and other types of objects
func (*Str) GtEq ¶
GtEq implements 'great than or equal' checking between Str object and other types of objects
func (*Str) LogicalAnd ¶
LogicalAnd implements logical AND between Str object and other types of objects
func (*Str) LogicalNot ¶
LogicalNot implements logical NOT on Str object
func (*Str) LogicalOr ¶
LogicalOr implements logical OR between Str object and other types of objects
func (*Str) LtEq ¶
LtEq implements 'less than or equal' checking between Str object and other types of objects
func (*Str) MethodCall ¶
MethodCall dispatch method from storage for Str object and executes it
func (*Str) MethodReverse ¶
MethodReverse reverse runes in Str objects via method
func (*Str) MethodSplit ¶
MethodSplit splits Str object on list of subtrings by delimeter via method
func (*Str) NotEqual ¶
NotEqual implements checking of unequation between Str object and other types of objects