compiler

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2020 License: Apache-2.0 Imports: 16 Imported by: 29

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyQuery        = errors.New("empty query")
	ErrNotImplemented    = errors.New("not implemented")
	ErrVariableNotFound  = errors.New("variable not found")
	ErrVariableNotUnique = errors.New("variable is already defined")
	ErrInvalidToken      = errors.New("invalid token")
	ErrInvalidDataSource = errors.New("invalid data source")
)

Functions

This section is empty.

Types

type Compiler added in v0.9.0

type Compiler struct {
	*NamespaceContainer
}

func New

func New(setters ...Option) *Compiler

func (*Compiler) Compile added in v0.9.0

func (c *Compiler) Compile(query string) (program *runtime.Program, err error)

func (*Compiler) MustCompile added in v0.9.0

func (c *Compiler) MustCompile(query string) *runtime.Program

type NamespaceContainer added in v0.8.0

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

func (*NamespaceContainer) MustRegisterFunction added in v0.13.0

func (nc *NamespaceContainer) MustRegisterFunction(name string, fun core.Function)

func (*NamespaceContainer) MustRegisterFunctions added in v0.13.0

func (nc *NamespaceContainer) MustRegisterFunctions(funcs *core.Functions)

func (*NamespaceContainer) Namespace added in v0.8.0

func (nc *NamespaceContainer) Namespace(name string) core.Namespace

func (*NamespaceContainer) RegisterFunction added in v0.8.0

func (nc *NamespaceContainer) RegisterFunction(name string, fun core.Function) error

func (*NamespaceContainer) RegisterFunctions added in v0.8.0

func (nc *NamespaceContainer) RegisterFunctions(funcs *core.Functions) error

func (*NamespaceContainer) RegisteredFunctions added in v0.8.0

func (nc *NamespaceContainer) RegisteredFunctions() []string

func (*NamespaceContainer) RemoveFunction added in v0.8.0

func (nc *NamespaceContainer) RemoveFunction(name string)

type Option

type Option func(opts *Options)

func WithoutStdlib

func WithoutStdlib() Option

type Options

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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