expression

package
v0.0.0-...-83c2f6f Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractIdentifier

func ExtractIdentifier(value string) string

func NewBooleanLiteral

func NewBooleanLiteral(value bool) hipathsys.Evaluator

func NewEmptyLiteral

func NewEmptyLiteral() hipathsys.Evaluator

func NewNumberLiteralFloat64

func NewNumberLiteralFloat64(value float64) hipathsys.Evaluator

func NewNumberLiteralInt

func NewNumberLiteralInt(value int32) hipathsys.Evaluator

func NewRawStringLiteral

func NewRawStringLiteral(value string) hipathsys.Evaluator

func ParseBooleanLiteral

func ParseBooleanLiteral(value string) (hipathsys.Evaluator, error)

func ParseDateLiteral

func ParseDateLiteral(value string) (hipathsys.Evaluator, error)

func ParseDateTimeLiteral

func ParseDateTimeLiteral(value string) (hipathsys.Evaluator, error)

func ParseNumberLiteral

func ParseNumberLiteral(value string) (hipathsys.Evaluator, error)

func ParseQuantityLiteral

func ParseQuantityLiteral(number string, unit string) (hipathsys.Evaluator, error)

func ParseStringLiteral

func ParseStringLiteral(value string) hipathsys.Evaluator

func ParseTimeLiteral

func ParseTimeLiteral(value string) (hipathsys.Evaluator, error)

Types

type ArithmeticExpression

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

func NewArithmeticExpression

func NewArithmeticExpression(evalLeft hipathsys.Evaluator, op hipathsys.ArithmeticOps, evalRight hipathsys.Evaluator) *ArithmeticExpression

func (*ArithmeticExpression) Evaluate

func (e *ArithmeticExpression) Evaluate(ctx hipathsys.ContextAccessor, node interface{}, loop hipathsys.Looper) (interface{}, error)

type AsTypeExpression

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

func NewAsTypeExpression

func NewAsTypeExpression(exprEvaluator hipathsys.Evaluator, name string) (*AsTypeExpression, error)

func (*AsTypeExpression) Evaluate

func (e *AsTypeExpression) Evaluate(ctx hipathsys.ContextAccessor, node interface{}, loop hipathsys.Looper) (interface{}, error)

type BooleanExpression

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

func NewBooleanExpression

func NewBooleanExpression(evalLeft hipathsys.Evaluator, op BooleanOp, evalRight hipathsys.Evaluator) *BooleanExpression

func (*BooleanExpression) Evaluate

func (e *BooleanExpression) Evaluate(ctx hipathsys.ContextAccessor, node interface{}, loop hipathsys.Looper) (interface{}, error)

type BooleanLiteral

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

func (*BooleanLiteral) Evaluate

func (e *BooleanLiteral) Evaluate(hipathsys.ContextAccessor, interface{}, hipathsys.Looper) (interface{}, error)

type BooleanOp

type BooleanOp int
const (
	AndOp BooleanOp = iota + 1
	OrOp
	XOrOp
	ImpliesOp
)

type CollectionExpression

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

func NewCollectionExpression

func NewCollectionExpression(eval hipathsys.Evaluator) CollectionExpression

func (*CollectionExpression) Evaluate

func (e *CollectionExpression) Evaluate(ctx hipathsys.ContextAccessor, node interface{}, loop hipathsys.Looper) (interface{}, error)

type ComparisonExpression

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

func NewComparisonExpression

func NewComparisonExpression(evalLeft hipathsys.Evaluator, op ComparisonOp, evalRight hipathsys.Evaluator) *ComparisonExpression

func (*ComparisonExpression) Evaluate

func (e *ComparisonExpression) Evaluate(ctx hipathsys.ContextAccessor, node interface{}, loop hipathsys.Looper) (interface{}, error)

type ComparisonOp

type ComparisonOp int
const (
	LessThanOp ComparisonOp = iota + 1
	LessOrEqualThanOp
	GreaterOrEqualThanOp
	GreaterThanOp
)

type ContainsExpression

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

func NewContainsExpression

func NewContainsExpression(evalLeft hipathsys.Evaluator, evalRight hipathsys.Evaluator, inverse bool) *ContainsExpression

func (*ContainsExpression) Evaluate

func (e *ContainsExpression) Evaluate(ctx hipathsys.ContextAccessor, node interface{}, loop hipathsys.Looper) (interface{}, error)

type DateLiteral

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

func (*DateLiteral) Evaluate

func (e *DateLiteral) Evaluate(hipathsys.ContextAccessor, interface{}, hipathsys.Looper) (interface{}, error)

type DateTimeLiteral

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

func (*DateTimeLiteral) Evaluate

func (e *DateTimeLiteral) Evaluate(hipathsys.ContextAccessor, interface{}, hipathsys.Looper) (interface{}, error)

type EmptyLiteral

type EmptyLiteral struct {
}

func (*EmptyLiteral) Evaluate

func (e *EmptyLiteral) Evaluate(hipathsys.ContextAccessor, interface{}, hipathsys.Looper) (interface{}, error)

type EqualityExpression

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

func NewEqualityExpression

func NewEqualityExpression(not bool, equivalent bool, evalLeft hipathsys.Evaluator, evalRight hipathsys.Evaluator) *EqualityExpression

func (*EqualityExpression) Evaluate

func (e *EqualityExpression) Evaluate(ctx hipathsys.ContextAccessor, node interface{}, loop hipathsys.Looper) (interface{}, error)

type ExtConstantTerm

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

func ParseExtConstantTerm

func ParseExtConstantTerm(value string) *ExtConstantTerm

func (*ExtConstantTerm) Evaluate

func (e *ExtConstantTerm) Evaluate(ctx hipathsys.ContextAccessor, _ interface{}, _ hipathsys.Looper) (interface{}, error)

type FunctionInvocation

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

func LookupFunctionInvocation

func LookupFunctionInvocation(name string, paramEvaluators []hipathsys.Evaluator) (*FunctionInvocation, error)

func (*FunctionInvocation) Evaluate

func (f *FunctionInvocation) Evaluate(ctx hipathsys.ContextAccessor, node interface{}, loop hipathsys.Looper) (interface{}, error)

type IndexInvocation

type IndexInvocation struct {
}

func NewIndexInvocation

func NewIndexInvocation() *IndexInvocation

func (*IndexInvocation) Evaluate

func (t *IndexInvocation) Evaluate(_ hipathsys.ContextAccessor, _ interface{}, loop hipathsys.Looper) (interface{}, error)

type IndexerExpression

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

func NewIndexerExpression

func NewIndexerExpression(exprEvaluator hipathsys.Evaluator, indexEvaluator hipathsys.Evaluator) *IndexerExpression

func (*IndexerExpression) Evaluate

func (e *IndexerExpression) Evaluate(ctx hipathsys.ContextAccessor, node interface{}, loop hipathsys.Looper) (interface{}, error)

type InvocationExpression

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

func NewInvocationExpression

func NewInvocationExpression(exprEvaluator hipathsys.Evaluator, invocationEvaluator hipathsys.Evaluator) *InvocationExpression

func (*InvocationExpression) Evaluate

func (e *InvocationExpression) Evaluate(ctx hipathsys.ContextAccessor, node interface{}, loop hipathsys.Looper) (interface{}, error)

type InvocationTerm

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

func NewInvocationTerm

func NewInvocationTerm(evaluator hipathsys.Evaluator) *InvocationTerm

func (*InvocationTerm) Evaluate

func (t *InvocationTerm) Evaluate(ctx hipathsys.ContextAccessor, node interface{}, loop hipathsys.Looper) (interface{}, error)

type IsTypeExpression

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

func NewIsTypeExpression

func NewIsTypeExpression(exprEvaluator hipathsys.Evaluator, name string) (*IsTypeExpression, error)

func (*IsTypeExpression) Evaluate

func (e *IsTypeExpression) Evaluate(ctx hipathsys.ContextAccessor, node interface{}, loop hipathsys.Looper) (interface{}, error)

type MemberInvocation

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

func NewMemberInvocation

func NewMemberInvocation(name string) *MemberInvocation

func (*MemberInvocation) Evaluate

func (i *MemberInvocation) Evaluate(ctx hipathsys.ContextAccessor, node interface{}, _ hipathsys.Looper) (interface{}, error)

type NegatorExpression

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

func NewNegatorExpression

func NewNegatorExpression(evaluator hipathsys.Evaluator) *NegatorExpression

func (*NegatorExpression) Evaluate

func (e *NegatorExpression) Evaluate(ctx hipathsys.ContextAccessor, node interface{}, loop hipathsys.Looper) (interface{}, error)

type NumberLiteral

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

func (*NumberLiteral) Evaluate

func (e *NumberLiteral) Evaluate(hipathsys.ContextAccessor, interface{}, hipathsys.Looper) (interface{}, error)

type QuantityLiteral

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

func (*QuantityLiteral) Evaluate

func (e *QuantityLiteral) Evaluate(hipathsys.ContextAccessor, interface{}, hipathsys.Looper) (interface{}, error)

type StringConcatExpression

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

func NewStringConcatExpression

func NewStringConcatExpression(evalLeft hipathsys.Evaluator, evalRight hipathsys.Evaluator) *StringConcatExpression

func (*StringConcatExpression) Evaluate

func (e *StringConcatExpression) Evaluate(ctx hipathsys.ContextAccessor, node interface{}, loop hipathsys.Looper) (interface{}, error)

type StringLiteral

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

func (*StringLiteral) Evaluate

func (e *StringLiteral) Evaluate(hipathsys.ContextAccessor, interface{}, hipathsys.Looper) (interface{}, error)

type ThisInvocation

type ThisInvocation struct {
}

func NewThisInvocation

func NewThisInvocation() *ThisInvocation

func (*ThisInvocation) Evaluate

func (t *ThisInvocation) Evaluate(_ hipathsys.ContextAccessor, _ interface{}, loop hipathsys.Looper) (interface{}, error)

type TimeLiteral

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

func (*TimeLiteral) Evaluate

func (e *TimeLiteral) Evaluate(hipathsys.ContextAccessor, interface{}, hipathsys.Looper) (interface{}, error)

type TotalInvocation

type TotalInvocation struct {
}

func NewTotalInvocation

func NewTotalInvocation() *TotalInvocation

func (*TotalInvocation) Evaluate

func (t *TotalInvocation) Evaluate(_ hipathsys.ContextAccessor, _ interface{}, loop hipathsys.Looper) (interface{}, error)

type UnionExpression

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

func NewUnionExpression

func NewUnionExpression(evalLeft hipathsys.Evaluator, evalRight hipathsys.Evaluator) *UnionExpression

func (*UnionExpression) Evaluate

func (e *UnionExpression) Evaluate(ctx hipathsys.ContextAccessor, node interface{}, loop hipathsys.Looper) (interface{}, error)

Jump to

Keyboard shortcuts

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