gentee: github.com/gentee/gentee Index | Files | Directories

package gentee

import "github.com/gentee/gentee"

Index

Package Files

gentee.go

Constants

const (
    SysSuspend   = vm.SysSuspend
    SysResume    = vm.SysResume
    SysTerminate = vm.SysTerminate
)

func Customize Uses

func Customize(custom *Custom) error

func Version Uses

func Version() string

Version returns the current version of the Gentee compiler.

type Custom Uses

type Custom struct {
    Embedded []EmbedItem
}

Custom is a structure with parameters for compiling and runtime

type EmbedItem Uses

type EmbedItem struct {
    Prototype string
    Object    interface{}
}

EmbedItem is a structure for declaration of embedded functions.

type Exec Uses

type Exec struct {
    *core.Exec
}

Exec is a structure with a bytecode that is ready to run

func (*Exec) Run Uses

func (exec *Exec) Run(settings Settings) (interface{}, error)

Run executes the bytecode.

type Gentee Uses

type Gentee struct {
    *core.Workspace
}

Gentee is a common structure for compiling and executing Gentee source code

func New Uses

func New() *Gentee

New creates a new Gentee workspace

func (*Gentee) Compile Uses

func (g *Gentee) Compile(input, path string) (*Exec, int, error)

Compile compiles the Gentee source code. The function returns bytecode, id of the compiled unit and error code.

func (*Gentee) CompileAndRun Uses

func (g *Gentee) CompileAndRun(filename string) (interface{}, error)

CompileAndRun compiles the specified Gentee source file and run it.

func (*Gentee) CompileFile Uses

func (g *Gentee) CompileFile(filename string) (*Exec, int, error)

CompileFile compiles the specified Gentee source file. The function returns bytecode, id of the compiled unit and error code.

func (*Gentee) Unit Uses

func (g *Gentee) Unit(unitID int) Unit

Unit returns the unit structure by its index.

type Settings Uses

type Settings struct {
    vm.Settings
}

Settings is a structure with parameters for running bytecode

type Unit Uses

type Unit struct {
    *core.Unit
}

Unit is a structure describing source code unit

Directories

PathSynopsis
cli
compiler
core
vm

Package gentee imports 7 packages (graph) and is imported by 1 packages. Updated 2020-04-08. Refresh now. Tools for package owners.