expressions

package
v0.401.4 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Parser) error

type Parser

type Parser struct {
	CelEnv             *cel.Env
	Provider           *typing.TypeProvider
	ExpectedReturnType *types.Type
}

func NewParser

func NewParser(options ...Option) (*Parser, error)

NewParser creates a new expression parser

func (*Parser) Extend added in v0.401.4

func (p *Parser) Extend(options ...Option) (*Parser, error)

Extend creates a new parser with the same environment configuration but extended with additional options

func (*Parser) Validate

func (p *Parser) Validate(expression *parser.Expression) ([]*errorhandling.ValidationError, error)

Validate validates an expression and returns a list of validation errors

Directories

Path Synopsis