3500c686b3
- add type infos to VM error messages - add 'Name' to UserFunction objects - add 'expectErrorString' to VM tests - replace vm.expectError() with vm.expectErrorString() to make it more explicit - add source map info to VM error messages - optimization in function calls - add file/line/col info to compiler errors - change stdlib module to be loaded from VM (instead of compiler) so they can be properly loaded after the source is compiled into binary - VM can take builtin modules optionally
12 lines
340 B
Go
12 lines
340 B
Go
package compiler
|
|
|
|
import "github.com/d5/tengo/compiler/source"
|
|
|
|
// CompilationScope represents a compiled instructions
|
|
// and the last two instructions that were emitted.
|
|
type CompilationScope struct {
|
|
instructions []byte
|
|
lastInstructions [2]EmittedInstruction
|
|
symbolInit map[string]bool
|
|
sourceMap map[int]source.Pos
|
|
}
|