From 83d1dc87f3336d70ccda476627c70c282b7b6e11 Mon Sep 17 00:00:00 2001 From: Mel Date: Fri, 27 May 2022 23:34:40 +0000 Subject: Function envs and value escaping --- pkg/lang/vm/errors.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'pkg/lang/vm/errors.go') 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 } -- cgit 1.4.1