about summary refs log tree commit diff
path: root/pkg/lang/vm/value
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/lang/vm/value')
-rw-r--r--pkg/lang/vm/value/cells.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg/lang/vm/value/cells.go b/pkg/lang/vm/value/cells.go
index 1c34762..116fa5a 100644
--- a/pkg/lang/vm/value/cells.go
+++ b/pkg/lang/vm/value/cells.go
@@ -10,6 +10,10 @@ func (a ArrayCell) DropCell(m mem.Mem) {
 	}
 }
 
+func (a ArrayCell) MatchingCellKind() mem.CellKind {
+	return mem.CellKindArray
+}
+
 func (a ArrayCell) Get() []Value {
 	return a
 }
@@ -19,6 +23,10 @@ type StringCell string
 func (s StringCell) DropCell(m mem.Mem) {
 }
 
+func (s StringCell) MatchingCellKind() mem.CellKind {
+	return mem.CellKindString
+}
+
 func (s StringCell) Get() string {
 	return string(s)
 }
@@ -29,6 +37,10 @@ func (o OutletCell) DropCell(m mem.Mem) {
 	Value(o).Drop(m)
 }
 
+func (o OutletCell) MatchingCellKind() mem.CellKind {
+	return mem.CellKindOutlet
+}
+
 func (o OutletCell) Get() Value {
 	return Value(o)
 }
@@ -41,6 +53,10 @@ func (e EnvCell) DropCell(m mem.Mem) {
 	}
 }
 
+func (e EnvCell) MatchingCellKind() mem.CellKind {
+	return mem.CellKindEnv
+}
+
 func (e EnvCell) Get() Env {
 	return Env(e)
 }