compiler

package
v0.0.0-...-fe632b3 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compiler

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

New returns a new compiler instance.

func (*Compiler) CompileExpression

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

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

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

Jump to

Keyboard shortcuts

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