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, anonFunctionName int) (*vm.File, []error)
- func CompileFunc(fn *ast.Func, file *vm.File, parentFunc *vm.CompiledFunc, ...) (*vm.CompiledFunc, error)
- func CompileTest(fn *ast.Test, file *vm.File, constants map[string]*ast.Literal) (*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 CompileFunc ¶
func CompileFunc( fn *ast.Func, file *vm.File, parentFunc *vm.CompiledFunc, constants map[string]*ast.Literal, ) (*vm.CompiledFunc, error)
CompileFunc translates a single function into a set of instructions. The number of instructions returned may be zero.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.