about summary refs log tree commit diff
path: root/pkg/lang/vm/errors.go
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-05-27 23:34:40 +0000
committerGitHub <noreply@github.com>2022-05-27 23:34:40 +0000
commit83d1dc87f3336d70ccda476627c70c282b7b6e11 (patch)
tree70610879d3de1ddf02bbe9067076fe65b52979a9 /pkg/lang/vm/errors.go
parent47c4cd3705bee9d7154c42ce95aef6f8a19e0661 (diff)
downloadjinx-83d1dc87f3336d70ccda476627c70c282b7b6e11.tar.zst
jinx-83d1dc87f3336d70ccda476627c70c282b7b6e11.zip
Function envs and value escaping
Diffstat (limited to 'pkg/lang/vm/errors.go')
-rw-r--r--pkg/lang/vm/errors.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/lang/vm/errors.go b/pkg/lang/vm/errors.go
index 37f3542..264dd3a 100644
--- a/pkg/lang/vm/errors.go
+++ b/pkg/lang/vm/errors.go
@@ -42,6 +42,15 @@ func (e ErrLocalIndexOutOfBounds) Error() string {
 	return fmt.Sprintf("local index out of bounds: %d (len: %d)", e.Index, e.Len)
 }
 
+type ErrStackIndexOutOfBounds struct {
+	Index int
+	Len   int
+}
+
+func (e ErrStackIndexOutOfBounds) Error() string {
+	return fmt.Sprintf("stack index out of bounds: %d (len: %d)", e.Index, e.Len)
+}
+
 type ErrInvalidOp struct {
 	Op uint8
 }