function

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Err      error
	ArgIndex int
}

Error is a function error which can contain an argument number

func NewError

func NewError(argIndex int, err error) *Error

NewError creates a new function error

func NewErrorf

func NewErrorf(argIndex int, format string, args ...interface{}) *Error

NewErrorf creates a new function error

func (*Error) Error

func (e *Error) Error() string

Error returns with the error message

type InterpreterRegistry

type InterpreterRegistry map[string]conflow.FunctionInterpreter

InterpreterRegistry contains a list of function interpreters and behaves as a node transformer registry

func (InterpreterRegistry) NodeTransformer

func (i InterpreterRegistry) NodeTransformer(name string) (parsley.NodeTransformer, bool)

NodeTransformer returns with the named node transformer

type Node

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

Node is a function node

func (*Node) ArgumentNodes

func (n *Node) ArgumentNodes() []parsley.Node

ArgumentNodes returns with the function argument nodes

func (*Node) Children

func (n *Node) Children() []parsley.Node

Children returns with the argument nodes

func (*Node) Name

func (n *Node) Name() conflow.ID

Name returns with the function name

func (*Node) Pos

func (n *Node) Pos() parsley.Pos

Pos returns with the node's position

func (*Node) ReaderPos

func (n *Node) ReaderPos() parsley.Pos

ReaderPos returns with the reader's position

func (*Node) Schema

func (n *Node) Schema() interface{}

Schema returns the schema for the node's value

func (*Node) SetReaderPos

func (n *Node) SetReaderPos(f func(parsley.Pos) parsley.Pos)

SetReaderPos amends the reader position using the given function

func (*Node) StaticCheck

func (n *Node) StaticCheck(ctx interface{}) parsley.Error

StaticCheck runs static analysis on the node

func (*Node) String

func (n *Node) String() string

func (*Node) Token

func (n *Node) Token() string

Token returns with the node's token

func (*Node) Value

func (n *Node) Value(ctx interface{}) (interface{}, parsley.Error)

Value returns with the result of the function

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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