evaluator

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: 0BSD Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInfinity          = errors.New("result of operation is an infinity")
	ErrInvalidType       = errors.New("invalid type")
	ErrInvalidValue      = errors.New("invalid value")
	ErrNotANumber        = errors.New("result of operation is not a number")
	ErrUndefinedVariable = errors.New("undefined variable")
)

Functions

func Evaluate

func Evaluate(node parser.Node, data any) (any, error)

Types

type InvalidTypeError

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

func (*InvalidTypeError) Error

func (err *InvalidTypeError) Error() string

func (*InvalidTypeError) Is

func (err *InvalidTypeError) Is(target error) bool

type UndefinedVariableError

type UndefinedVariableError struct {
	Variable string
}

func (*UndefinedVariableError) Error

func (err *UndefinedVariableError) Error() string

func (*UndefinedVariableError) Is

func (err *UndefinedVariableError) Is(target error) bool

Jump to

Keyboard shortcuts

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