compiler

package
v0.0.0-...-26b8db2 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2020 License: Apache-2.0 Imports: 8 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
}

Compiler compile scripts from string

func New

func New() *Compiler

New return new compiler

func (Compiler) Compile

func (c Compiler) Compile(script *Script) (*ast.Program, error)

Compile file

type Script

type Script struct {
	Filename string
	Code     string
}

Script :

func ReadScript

func ReadScript(filename string) (*Script, error)

ReadScript reads file given filename and store it

Jump to

Keyboard shortcuts

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