pathlang

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ExpressionAnnotation = evaluate.Annotation{
		Name:        "leg.relay.sh/expression",
		Description: "expression",
	}
)

Functions

func DefaultExpression

func DefaultExpression[T ref.References[T]]() gval.Language

func DefaultTemplate

func DefaultTemplate[T ref.References[T]]() gval.Language

func InfixOperationAnnotation

func InfixOperationAnnotation(name string) evaluate.Annotation

func OperandAnnotation

func OperandAnnotation(n int) evaluate.Annotation

func PrefixOperationAnnotation

func PrefixOperationAnnotation(name string) evaluate.Annotation

Types

type Language

type Language[T ref.References[T]] struct {
	// contains filtered or unexported fields
}

func New

func New[T ref.References[T]](opts ...Option[T]) *Language[T]

func (*Language[T]) Expression

func (l *Language[T]) Expression(ev evaluate.Evaluator[T]) gval.Language

func (*Language[T]) Template

func (l *Language[T]) Template(ev evaluate.Evaluator[T]) gval.Language

type Option

type Option[T ref.References[T]] interface {
	ApplyToOptions(target *Options[T])
}

type Options

type Options[T ref.References[T]] struct {
	FunctionMap     fn.Map[T]
	EagerEvaluation bool
}

func (*Options[T]) ApplyOptions

func (o *Options[T]) ApplyOptions(opts []Option[T])

func (*Options[T]) ApplyToOptions

func (o *Options[T]) ApplyToOptions(target *Options[T])

type WithEagerEvaluation

type WithEagerEvaluation[T ref.References[T]] bool

func (WithEagerEvaluation[T]) ApplyToOptions

func (wee WithEagerEvaluation[T]) ApplyToOptions(target *Options[T])

type WithFunctionMap

type WithFunctionMap[T ref.References[T]] struct{ fn.Map[T] }

func (WithFunctionMap[T]) ApplyToOptions

func (wfm WithFunctionMap[T]) ApplyToOptions(target *Options[T])

Jump to

Keyboard shortcuts

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