summaryrefslogtreecommitdiff
path: root/vm
diff options
context:
space:
mode:
Diffstat (limited to 'vm')
-rw-r--r--vm/vm.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/vm/vm.go b/vm/vm.go
index f981415..18207f7 100644
--- a/vm/vm.go
+++ b/vm/vm.go
@@ -11,10 +11,8 @@ import (
const debug = true
-type (
- Op int // Op is a VM opcode (bytecode instruction).
- Pos int // Pos is the source code position of instruction
-)
+// Op is a VM opcode (bytecode instruction).
+type Op int
//go:generate stringer -type=Op
@@ -58,6 +56,9 @@ const (
Swap // --
)
+// Pos is the source code position of instruction.
+type Pos int
+
// Instruction represents a virtual machine bytecode instruction.
type Instruction struct {
Pos // position in source