Help us shape the future of Go! Take the 2026 Go Developer Survey

compiler

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2016 License: Apache-2.0 Imports: 3 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 compiles the Yaml file to the intermediate representation.

func New

func New() *Compiler

func (*Compiler) Compile

func (c *Compiler) Compile(in []byte) (*runner.Spec, error)

CompileString compiles the Yaml configuration file and returns the intermediate representation for the interpreter.

func (*Compiler) CompileString

func (c *Compiler) CompileString(in string) (*runner.Spec, error)

CompileString compiles the Yaml configuration string and returns the intermediate representation for the interpreter.

func (*Compiler) Transforms

func (c *Compiler) Transforms(trans []Transform) *Compiler

Transforms sets the compiler transforms use to transform the intermediate representation during compilation.

type Transform

type Transform interface {
	VisitRoot(*parse.RootNode) error
	VisitVolume(*parse.VolumeNode) error
	VisitNetwork(*parse.NetworkNode) error
	VisitBuild(*parse.BuildNode) error
	VisitContainer(*parse.ContainerNode) error
}

Transform is used to transform nodes from the parsed Yaml file during the compilation process. A Transform may be used to add, disable or alter nodes.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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