Documentation ¶
Overview ¶
Package interpreter contains the recipe interpreter for the machine node.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrCompilerConfigNil occurs if an interpreter is supplied a nil compiler config. ErrCompilerConfigNil = errors.New("compiler config nil") // ErrBadOp occurs if an interpreter is supplied an unknown opcode. ErrBadOp = errors.New("bad opcode") // ErrBadOutput occurs if an interpreter is asked to output something that isn't compatible with its output spec. ErrBadOutput = errors.New("bad output type") ErrFileUnavailable = errors.New("file not available") // ErrObjOverflow occurs if too many object files are created. ErrObjOverflow = errors.New("object file count overflow") )
View Source
var ErrDriverNil = errors.New("driver nil")
ErrDriverNil occurs when the compiler tries to use the nil pointer as its single-compile driver.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver interface { // RunCompiler runs the compiler job j. // If applicable, errw will be connected to the compiler's standard error. // // Implementors should note that the paths in j are slash-paths, and will need converting to filepaths. RunCompiler(ctx context.Context, j compiler.Job, sr service.Runner) error }
Driver is the interface of things that can run compilers.
type Interpreter ¶
type Interpreter struct {
// contains filtered or unexported fields
}
Interpreter is an interpreter for compile recipes.
type Option ¶
type Option func(*Interpreter)
Option is the type of options to the interpreter.
func CompileWith ¶
CompileWith sets the interpreter's compiler to driver d and config c. This is required to interpret recipes that involve compilation.
func SetMaxObjs ¶
SetMaxObjs sets the maximum number of object files the interpreter can create.
Click to show internal directories.
Click to hide internal directories.