compiler

package
v0.0.0-...-13b9dfa Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2018 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CodeGen

func CodeGen(info *buildInfo) (*bytes.Buffer, error)

CodeGen is the function that compiles the program to bytecode.

func Compile

func Compile(r io.Reader, o *Options) ([]byte, error)

Compile compiles a Go program into bytecode that can run on the NEO virtual machine.

func CompileAndInspect

func CompileAndInspect(src string) error

CompileAndInspect compiles the program and dumps the opcode in a user friendly format.

func CompileAndSave

func CompileAndSave(src string, o *Options) error

CompileAndSave will compile and save the file to disk.

Types

type Options

type Options struct {
	// The extension of the output file default set to .avm
	Ext string

	// The name of the output file.
	Outfile string

	// Debug will output an hex encoded string of the generated bytecode.
	Debug bool
}

Options contains all the parameters that affect the behaviour of the compiler.

Jump to

Keyboard shortcuts

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