istio: istio.io/istio/mixer/pkg/lang/compiler Index | Files

package compiler

import "istio.io/istio/mixer/pkg/lang/compiler"

Package compiler implements a compiler that converts Mixer's expression language into a Mixer IL-based program that can be executed via an interpreter.

Index

Package Files

compiler.go

type Compiler Uses

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

Compiler is a stateful compiler that can be used to gradually build an il.Program out of multiple independent compilation of expressions.

func New Uses

func New(finder attribute.AttributeDescriptorFinder, functions map[string]ast.FunctionMetadata) *Compiler

New returns a new compiler instance.

func (*Compiler) CompileExpression Uses

func (c *Compiler) CompileExpression(text string) (uint32, descriptor.ValueType, error)

CompileExpression creates a new parameterless IL function, using the given expression text as its body. Upon success, it returns the id of the generated function.

func (*Compiler) Program Uses

func (c *Compiler) Program() *il.Program

Program returns the program instance that is being built by this compiler.

Package compiler imports 7 packages (graph) and is imported by 2 packages. Updated 2019-09-02. Refresh now. Tools for package owners.