Globals to compiler
This commit is contained in:
@@ -27,6 +27,8 @@ const (
|
||||
OpJumpNotTruthy
|
||||
OpJump
|
||||
OpNull
|
||||
OpGetGlobal
|
||||
OpSetGlobal
|
||||
)
|
||||
|
||||
type Definition struct {
|
||||
@@ -51,6 +53,8 @@ var definitions = map[Opcode]*Definition{
|
||||
OpJumpNotTruthy: {"OpJumpNotTruthy", []int{2}},
|
||||
OpJump: {"OpJump", []int{2}},
|
||||
OpNull: {"OpNull", []int{}},
|
||||
OpGetGlobal: {"OpGetGlobal", []int{2}},
|
||||
OpSetGlobal: {"OpSetGlobal", []int{2}},
|
||||
}
|
||||
|
||||
func Lookup(op byte) (*Definition, error) {
|
||||
|
||||
Reference in New Issue
Block a user