summaryrefslogtreecommitdiff
path: root/vm/vm.go
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2025-11-28 16:34:28 +0100
committerMarc Vertes <mvertes@free.fr>2025-11-28 16:34:28 +0100
commitfbc73922e9853d7e344e388f3fdfedb8fa323682 (patch)
tree17cab9c49babad09906a34f3c16ebb0558c4e948 /vm/vm.go
parent22b020225ae77ca1cf9f9984817df9b7fd1aaa12 (diff)
doc: improve comments, pass lint
Also improve the setup of golangci-lint.
Diffstat (limited to 'vm/vm.go')
-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