dvevaluation

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2020 License: MIT Imports: 7 Imported by: 3

Documentation

Overview

********************************************************************** MicroCore Copyright 2020 - 2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************

********************************************************************** MicroCore Copyright 2020 - 2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************

********************************************************************** MicroCore Copyright 2020 - 2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************

********************************************************************** MicroCore Copyright 2020 - 2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************

********************************************************************** MicroCore Copyright 2020 - 2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************

********************************************************************** MicroCore Copyright 2020 - 2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************

********************************************************************** MicroCore Copyright 2020 - 2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************

********************************************************************** MicroCore Copyright 2020 - 2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************

********************************************************************** MicroCore Copyright 2020 - 2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************

********************************************************************** MicroCore Copyright 2020 - 2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************

********************************************************************** MicroCore Copyright 2020 - 2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************

********************************************************************** MicroCore Copyright 2020 - 2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************

Index

Constants

View Source
const (
	COMPARE_NOT = iota
	COMPARE_AS_NUMBERS
	COMPARE_AS_INTEGERS
	COMPARE_AS_STRINGS
)
View Source
const (
	BOOLEAN_FALSE = "false"
	BOOLEAN_TRUE  = "true"
)
View Source
const (
	UNARY_BOOLEAN_NOT = 1 << iota
	UNARY_LOGICAL_NOT = 1 << iota
	UNARY_MINUS       = 1 << iota
	UNARY_PLUS        = 1 << iota
)
View Source
const (
	JS_TYPE_UNDEFINED = iota
	JS_TYPE_NULL      = iota
	JS_TYPE_NUMBER    = iota
	JS_TYPE_BOOLEAN   = iota
	JS_TYPE_STRING    = iota
	JS_TYPE_OBJECT    = iota
	JS_TYPE_ARRAY     = iota
	JS_TYPE_FUNCTION  = iota
)
View Source
const (
	EVALUATE_OPTION_UNDEFINED = 1 << (iota + 8)
)
View Source
const LENGTH_PROPERTY = "length"

Variables

View Source
var CalculatorPostUnaryMap = map[string]dvgrammar.UnaryVisitor{
	"++": PostPlusPlusOperator,
	"--": PostMinusMinusOperator,
}
View Source
var CalculatorRules = &dvgrammar.GrammarRuleDefinitions{
	Visitors:          CalculatorOperators,
	DataGetter:        CalculatorDataGetter,
	EvaluateOptions:   0,
	UnaryPreVisitors:  CalculatorUnaryMap,
	UnaryPostVisitors: CalculatorPostUnaryMap,
}
View Source
var GlobalFunctionPool = make(map[string]interface{})
View Source
var GlobalFunctionPrototype = NewObject(GlobalFunctionPool)
View Source
var LogicalRules = &dvgrammar.GrammarRuleDefinitions{
	BaseGrammar:      dvgrammar.LogicalGrammarBaseDefinition,
	Visitors:         LogicalOperators,
	DataGetter:       LogicalDataGetter,
	EvaluateOptions:  0,
	UnaryPreVisitors: LogicalUnaryMap,
}
View Source
var LogicalUnaryMap = map[string]dvgrammar.UnaryVisitor{
	"!": LogicalNotOperator,
}

Functions

func AddToGlobalFunctionPool

func AddToGlobalFunctionPool(properties map[string]interface{})

func AnyCompareAnyWithTypes

func AnyCompareAnyWithTypes(kind1 int, value1 interface{}, kind2 int, value2 interface{}) int

returns 1-greater, -1-lesser, 0-equal, -2 not applied

func AnyGetType

func AnyGetType(v interface{}) int

func AnyToBoolean

func AnyToBoolean(v interface{}) bool

func AnyToNumber

func AnyToNumber(v interface{}) float64

func AnyToNumberInt

func AnyToNumberInt(v interface{}) (f int64, ok bool)

func AnyToString

func AnyToString(v interface{}) string

func AnyWithTypeToBoolean

func AnyWithTypeToBoolean(kind int, v interface{}, defValue bool) bool

func AnyWithTypeToNumber

func AnyWithTypeToNumber(kind int, v interface{}) float64

func AnyWithTypeToNumberInt

func AnyWithTypeToNumberInt(kind int, v interface{}) (int64, bool)

func AnyWithTypeToString

func AnyWithTypeToString(kind int, v interface{}) (string, bool)

func ApplyDvFunction

func ApplyDvFunction(self interface{}, args []interface{}) (interface{}, error)

func AssignArrayStringToVariable

func AssignArrayStringToVariable(parent *DvVariable, variableDefinition string, data []string, force bool) error

func AssignIntToVariable

func AssignIntToVariable(parent *DvVariable, variableDefinition string, data int, force bool) error

func AssignMapStringToVariable

func AssignMapStringToVariable(parent *DvVariable, variableDefinition string, data map[string]string, force bool) error

func AssignVariable

func AssignVariable(parent *DvVariable, keys []string, value *DvVariable, force bool) error

func AssignVariableDirect

func AssignVariableDirect(parent *DvVariable, value *DvVariable) error

func AssignVariableToVariable

func AssignVariableToVariable(parent *DvVariable, variableDefinition string, data *DvVariable, force bool) error

func BindDvFunction

func BindDvFunction(self interface{}, args []interface{}) (interface{}, error)

func CalculateDefined

func CalculateDefined(data []byte, scope dvgrammar.ScopeInterface, reference *dvgrammar.SourceReference, visitorOptions int) (*dvgrammar.ExpressionValue, error)

func CalculatorDataGetter

func CalculatorDataGetter(token *dvgrammar.Token, context *dvgrammar.ExpressionContext) (*dvgrammar.ExpressionValue, error)

func CalculatorEvaluator

func CalculatorEvaluator(data []byte, scope dvgrammar.ScopeInterface, reference *dvgrammar.SourceReference, visitorOptions int) (*dvgrammar.ExpressionValue, error)

func CallDvFunction

func CallDvFunction(self interface{}, args []interface{}) (interface{}, error)

func CompareAsIntegers

func CompareAsIntegers(value1 interface{}, value2 interface{}) int

func CompareAsNumbers

func CompareAsNumbers(value1 interface{}, value2 interface{}) int

func CompareAsStrings

func CompareAsStrings(value1 interface{}, value2 interface{}) int

func CompareByComparisonType

func CompareByComparisonType(compareType int, value1 interface{}, value2 interface{}) int

func ConvertStringMapToDvVariableMap

func ConvertStringMapToDvVariableMap(data map[string]string) (res map[string]*DvVariable)

func ConvertVariableNameToKeys

func ConvertVariableNameToKeys(data string) (res []string, err error)

func DeleteVariable

func DeleteVariable(parent *DvVariable, keys []string) error

func DvObjectInternalToString

func DvObjectInternalToString(obj *DvObject) string

func ExecFunction

func ExecFunction(fn interface{}, self interface{}, arguments []interface{}) (interface{}, error)

func GetDvFunctionArguments

func GetDvFunctionArguments(funcObj *DvObject) []string

func GetEscapedString

func GetEscapedString(s string) string

func GetIntFromVariable

func GetIntFromVariable(parent *DvVariable, variableDefinition string, force bool) (res int, err error)

func GetIntFromVariableAndIncrementAfter

func GetIntFromVariableAndIncrementAfter(parent *DvVariable, variableDefinition string, force bool) (res int, err error)

func GetIntFromVariableAndModify

func GetIntFromVariableAndModify(parent *DvVariable, variableDefinition string, modify int, after bool, force bool) (res int, err error)

func GetNumberKindFromString

func GetNumberKindFromString(v []byte, n int) (int, int, int64, float64)

func GetStringFromVariable

func GetStringFromVariable(parent *DvVariable, variableDefinition string, force bool) (res string, err error)

func GetVariableByDefinition

func GetVariableByDefinition(parent *DvVariable, variableDefinition string) (thisValue *DvVariable, child *DvVariable, prototyped bool, err error, keys []string)

func GetVariableByKeys

func GetVariableByKeys(parent *DvVariable, keys []string) (thisValue *DvVariable, child *DvVariable, prototyped bool, err error)

func Init

func Init() bool

func IsDefined

func IsDefined(data []byte, scope dvgrammar.ScopeInterface, row int, col int, place string, visitorOptions int) (int, error)

func IsFunction

func IsFunction(v interface{}) bool

func LogicalDataGetter

func LogicalDataGetter(token *dvgrammar.Token, context *dvgrammar.ExpressionContext) (*dvgrammar.ExpressionValue, error)

func ModifySimpleValueAfterGet

func ModifySimpleValueAfterGet(thisVal *DvVariable, child *DvVariable, prototyped bool, value string, tp int, keys []string) error

func NumberToInt

func NumberToInt(v float64) (f int64, ok bool)

func PostMinusMinusOperator

func PostMinusMinusOperator(value *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func PreMinusMinusOperator

func PreMinusMinusOperator(value *dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorBoolAnd

func ProcessorBoolAnd(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorBoolOr

func ProcessorBoolOr(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorBoolXor

func ProcessorBoolXor(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorBooleanAnd

func ProcessorBooleanAnd(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorBooleanOr

func ProcessorBooleanOr(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorDivision

func ProcessorDivision(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorEqual

func ProcessorEqual(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorEqualExact

func ProcessorEqualExact(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorGreaterEqual

func ProcessorGreaterEqual(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorGreaterThan

func ProcessorGreaterThan(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorLeftShift

func ProcessorLeftShift(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorLessEqual

func ProcessorLessEqual(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorLessThan

func ProcessorLessThan(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorLogicalRightShift

func ProcessorLogicalRightShift(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorMinus

func ProcessorMinus(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorMultiply

func ProcessorMultiply(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorNotEqual

func ProcessorNotEqual(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorNotEqualExact

func ProcessorNotEqualExact(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorPercent

func ProcessorPercent(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorPlus

func ProcessorPlus(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorPower

func ProcessorPower(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func ProcessorRightShift

func ProcessorRightShift(values []*dvgrammar.ExpressionValue, tree *dvgrammar.BuildNode, context *dvgrammar.ExpressionContext, operator string) (*dvgrammar.ExpressionValue, error)

func SetNodeValue

func SetNodeValue(tree *dvgrammar.BuildNode, v interface{}, dataType int, context *dvgrammar.ExpressionContext) error

func StringToAny

func StringToAny(v string) interface{}

func StringToNumber

func StringToNumber(v string) float64

func ValidateNumber

func ValidateNumber(data string) error

Types

type DvCall

type DvCall struct {
	Input  []string `json:"input"`
	Name   string   `json:"name"`
	Output string   `json:"output"`
}

type DvContext

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

func (*DvContext) CurrentRoutineCallBreak

func (context *DvContext) CurrentRoutineCallBreak() error

func (*DvContext) CurrentRoutineCallExecute

func (context *DvContext) CurrentRoutineCallExecute(routine *DvRoutine) (bool, error)

func (*DvContext) CurrentRoutineCallShift

func (context *DvContext) CurrentRoutineCallShift(delta int) (int, error)

func (*DvContext) DumpContextMemory

func (context *DvContext) DumpContextMemory()

func (*DvContext) ExecuteCurrentRoutine

func (context *DvContext) ExecuteCurrentRoutine() (bool, error)

func (*DvContext) ExecuteRoutine

func (context *DvContext) ExecuteRoutine(routine *DvRoutine) error

func (*DvContext) ExecuteRoutines

func (context *DvContext) ExecuteRoutines(routines []string, params []string) error

func (*DvContext) FunctionCallByKeys

func (context *DvContext) FunctionCallByKeys(variable *DvVariable, keys []string, params []*DvVariable, thisVariable *DvVariable) (*DvVariable, error)

func (*DvContext) FunctionCallByVariableDefinition

func (context *DvContext) FunctionCallByVariableDefinition(variable *DvVariable, variableDefinition string, params []*DvVariable, thisVariable *DvVariable) (*DvVariable, error)

func (*DvContext) FunctionCallByVariableDefinitionWithStringParams

func (context *DvContext) FunctionCallByVariableDefinitionWithStringParams(variable *DvVariable, variableDefinition string, params []string, thisVariable *DvVariable) (*DvVariable, error)

func (*DvContext) RoutineCallExecute

func (context *DvContext) RoutineCallExecute(dvCall *DvCall) error

func (*DvContext) SetGeneralArguments

func (context *DvContext) SetGeneralArguments(params map[string]string) error

type DvFunc

type DvFunc func(interface{}, []interface{}) (interface{}, error)

type DvFunction

type DvFunction struct {
	Name string
	Args []string
	Fn   DvFunc
}

func (*DvFunction) ToString

func (fn *DvFunction) ToString() string

type DvObject

type DvObject struct {
	Value      interface{}
	Options    int
	Properties map[string]interface{}
	Prototype  *DvObject
}
var DvFunctionPrototype *DvObject

func NewDvFunction

func NewDvFunction(name string, args []string, fn DvFunc) *DvObject

func NewDvObject

func NewDvObject(properties map[string]string, prototype *DvObject) *DvObject

func NewDvObjectFrom2Maps

func NewDvObjectFrom2Maps(localMap map[string]string, globalMap map[string]string) *DvObject

func NewDvObjectWithGlobalPrototype

func NewDvObjectWithGlobalPrototype(properties map[string]string) *DvObject

func NewDvObjectWithSpecialValues

func NewDvObjectWithSpecialValues(value interface{}, kind int, proto *DvObject, properties map[string]interface{}) *DvObject

func NewObject

func NewObject(properties map[string]interface{}) *DvObject

func NewObjectWithPrototype

func NewObjectWithPrototype(properties map[string]interface{}, prototype *DvObject) *DvObject

func (*DvObject) AssignProperties

func (obj *DvObject) AssignProperties(properties map[string]interface{})

func (*DvObject) CalculateExpression

func (obj *DvObject) CalculateExpression(b []byte) ([]byte, error)

func (*DvObject) CalculateString

func (obj *DvObject) CalculateString(str string) (string, error)

func (*DvObject) CalculateStringWithBrackets

func (obj *DvObject) CalculateStringWithBrackets(b []byte, level int) (string, error)

func (*DvObject) Get

func (obj *DvObject) Get(key string) (interface{}, bool)

func (*DvObject) GetObjectType

func (obj *DvObject) GetObjectType() int

func (*DvObject) GetString

func (obj *DvObject) GetString(key string) string

func (*DvObject) Set

func (obj *DvObject) Set(key string, value interface{})

func (*DvObject) SetProperty

func (obj *DvObject) SetProperty(name string, value interface{})

func (*DvObject) ToBoolean

func (obj *DvObject) ToBoolean() bool

func (*DvObject) ToNumber

func (obj *DvObject) ToNumber() float64

func (*DvObject) ToNumberInt

func (obj *DvObject) ToNumberInt() (int64, bool)

func (*DvObject) ToString

func (obj *DvObject) ToString() string

type DvRoutine

type DvRoutine struct {
	Name         string   `json:"name"`
	Calls        []DvCall `json:"calls"`
	Dependencies []string `json:"dependencies"`
}

type DvScript

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

func ParseScripts

func ParseScripts(scripts []string) (*DvScript, error)

func (*DvScript) AddRoutines

func (engine *DvScript) AddRoutines(routines []DvRoutine) error

func (*DvScript) GetNewContext

func (engine *DvScript) GetNewContext() *DvContext

func (*DvScript) VerifyRoutines

func (engine *DvScript) VerifyRoutines(routines []string) error

type DvVariable

type DvVariable struct {
	Refs      map[string]*DvVariable
	Value     string
	Tp        int
	Fn        DvvFunction
	Prototype *DvVariable
}
var ArrayMaster *DvVariable = RegisterMasterVariable("Array", &DvVariable{Tp: JS_TYPE_OBJECT})
var FunctionMaster *DvVariable = RegisterMasterVariable("Function", &DvVariable{
	Refs: make(map[string]*DvVariable),
	Tp:   JS_TYPE_OBJECT,
	Prototype: &DvVariable{
		Refs: map[string]*DvVariable{
			"call": {
				Tp: JS_TYPE_FUNCTION,
				Fn: FunctionCall,
			},
			"apply": {
				Tp: JS_TYPE_FUNCTION,
				Fn: FunctionApply,
			},
			"bind": {
				Tp: JS_TYPE_FUNCTION,
				Fn: FunctionBindLite,
			},
		},
		Tp: JS_TYPE_OBJECT,
	},
})
var ObjectMaster *DvVariable = RegisterMasterVariable("Object", &DvVariable{Tp: JS_TYPE_OBJECT})

func ConvertDvFunctionToDvVariable

func ConvertDvFunctionToDvVariable(fn DvvFunction) *DvVariable

func ConvertStringArrayToDvVariableArray

func ConvertStringArrayToDvVariableArray(data []string) (res []*DvVariable)

func DvVariableFromArray

func DvVariableFromArray(parent *DvVariable, data []*DvVariable) *DvVariable

func DvVariableFromInt

func DvVariableFromInt(parent *DvVariable, data int) *DvVariable

func DvVariableFromMap

func DvVariableFromMap(parent *DvVariable, data map[string]*DvVariable, reuse bool) *DvVariable

func DvVariableFromString

func DvVariableFromString(parent *DvVariable, data string) *DvVariable

func DvVariableFromStringArray

func DvVariableFromStringArray(parent *DvVariable, data []string) *DvVariable

func DvVariableFromStringMap

func DvVariableFromStringMap(parent *DvVariable, data map[string]string) *DvVariable

func DvVariableGetNewObject

func DvVariableGetNewObject() *DvVariable

func FunctionApply

func FunctionApply(context *DvContext, thisVariable *DvVariable, params []*DvVariable) (*DvVariable, error)

func FunctionBind

func FunctionBind(context *DvContext, thisVariable *DvVariable, params []*DvVariable) (*DvVariable, error)

func FunctionBindLite

func FunctionBindLite(context *DvContext, thisVariable *DvVariable, params []*DvVariable) (*DvVariable, error)

func FunctionCall

func FunctionCall(context *DvContext, thisVariable *DvVariable, params []*DvVariable) (*DvVariable, error)

func QuickNumberEvaluation

func QuickNumberEvaluation(parent *DvVariable, data string) (res *DvVariable, err error)

func QuickStringEvaluation

func QuickStringEvaluation(parent *DvVariable, data string) (res *DvVariable, err error)

func QuickVariableArrayEvaluation

func QuickVariableArrayEvaluation(parent *DvVariable, data []string) (res []*DvVariable, err error)

func QuickVariableEvaluation

func QuickVariableEvaluation(parent *DvVariable, data string) (res *DvVariable, err error)

func RegisterMasterObject

func RegisterMasterObject(name string, values map[string]*DvVariable, functions map[string]DvvFunction) *DvVariable

func RegisterMasterVariable

func RegisterMasterVariable(name string, variable *DvVariable) *DvVariable

func (*DvVariable) GetIntValue

func (variable *DvVariable) GetIntValue(force bool) (int, error)

func (*DvVariable) GetStringArrayMap

func (variable *DvVariable) GetStringArrayMap() (res map[string][]string)

func (*DvVariable) GetStringArrayValue

func (variable *DvVariable) GetStringArrayValue() []string

func (*DvVariable) GetStringMap

func (variable *DvVariable) GetStringMap() (res map[string]string)

func (*DvVariable) GetStringValue

func (variable *DvVariable) GetStringValue() string

func (*DvVariable) GetStringValueAsBytes

func (variable *DvVariable) GetStringValueAsBytes() []byte

func (*DvVariable) GetVariableArray

func (variable *DvVariable) GetVariableArray(force bool) ([]*DvVariable, error)

func (*DvVariable) JsonStringify

func (variable *DvVariable) JsonStringify() []byte

func (*DvVariable) JsonStringifyNonEmpty

func (variable *DvVariable) JsonStringifyNonEmpty() []byte

func (*DvVariable) ObjectGet

func (variable *DvVariable) ObjectGet(key string) (*DvVariable, error)

func (*DvVariable) ObjectGetByKeys

func (variable *DvVariable) ObjectGetByKeys(keys []string) (*DvVariable, error)

func (*DvVariable) ObjectGetByVariableDefinition

func (variable *DvVariable) ObjectGetByVariableDefinition(variableDefinition string) (*DvVariable, error)

func (*DvVariable) ObjectInPrototypedChain

func (variable *DvVariable) ObjectInPrototypedChain(key string) *DvVariable

func (*DvVariable) SetSimpleValue

func (variable *DvVariable) SetSimpleValue(value string, tp int) error

type DvVariable_DumpInfo

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

type DvvFunction

type DvvFunction func(*DvContext, *DvVariable, []*DvVariable) (*DvVariable, error)

type EvaluateBoolean

type EvaluateBoolean struct {
	FinalResult bool
	Err         error
}

func EvalAsBoolean

func EvalAsBoolean(data []byte, globalMap map[string]string, localMap map[string]string, row int, column int, place string) (r EvaluateBoolean)

type EvaluateResult

type EvaluateResult struct {
	FinalResult interface{}
	Err         error
	EndPos      int
}

func FindEndAndParse

func FindEndAndParse(data []byte, pos int, limit int, sequenceLimit int, globalMap map[string]string, localMap map[string]string, row int, column int, place string) *EvaluateResult

func Parse

func Parse(data []byte, globalMap map[string]string, localMap map[string]string, row int, column int, place string) (r *EvaluateResult)

func ParseForDvObject

func ParseForDvObject(data []byte, params *DvObject, row int, column int, place string) *EvaluateResult

Directories

Path Synopsis
********************************************************************** MicroCore Copyright 2020-2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) *********************************************************************** ********************************************************************** MicroCore Copyright 2020-2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************
********************************************************************** MicroCore Copyright 2020-2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) *********************************************************************** ********************************************************************** MicroCore Copyright 2020-2020 by Danyil Dobryvechir (dobrivecher@yahoo.com ddobryvechir@gmail.com) ***********************************************************************

Jump to

Keyboard shortcuts

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