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.

            Source Files