compiler

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

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
}

A Compiler that can parse files, string table files, or expressions to executable programs.

func NewCompiler

func NewCompiler() (*Compiler, error)

NewCompiler creates a new compiler for use.

func (*Compiler) CompileExpression

func (c *Compiler) CompileExpression(code string) (program.Evallable, error)

CompileExpression compiles an expression so it can be executed by a program.

func (*Compiler) CompileFile

func (c *Compiler) CompileFile(fileName string) (*program.Program, error)

CompileFile compiles the file with the passed path.

func (*Compiler) CompileString

func (c *Compiler) CompileString(code string) (*program.Program, error)

CompileString compiles the string as if it were a table file.

Jump to

Keyboard shortcuts

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