Documentation ¶
Overview ¶
Package compiler translates the ast structures that represent the parsed course code into instructions that can be executed by the VM.
Index ¶
- func Compile(rootPath, pkgPath string, includeTests bool) (*vm.File, []error)
- func CompileFile(f *parser.File, interfaces map[string]map[string]*types.Type, ...) (*vm.File, error)
- func CompileFunc(fn *ast.Func, file *vm.File) (*vm.CompiledFunc, error)
- func CompileTest(fn *ast.Test, file *vm.File) (*vm.CompiledTest, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compile ¶ added in v0.19.0
Compile will return the compiled file. If there are any dependent packages they will also be compiled.
func CompileFile ¶
func CompileFile( f *parser.File, interfaces map[string]map[string]*types.Type, constants map[string]*ast.Literal, ) (*vm.File, error)
CompileFile translates a single file into a set of instructions. The number of instructions returned may be zero.
func CompileFunc ¶
CompileFunc translates a single function into a set of instructions. The number of instructions returned may be zero.
func CompileTest ¶
CompileTest will compile a test.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.