summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/d5/tengo/objects/indexable.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/d5/tengo/objects/indexable.go')
-rw-r--r--vendor/github.com/d5/tengo/objects/indexable.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/vendor/github.com/d5/tengo/objects/indexable.go b/vendor/github.com/d5/tengo/objects/indexable.go
new file mode 100644
index 00000000..bbc81633
--- /dev/null
+++ b/vendor/github.com/d5/tengo/objects/indexable.go
@@ -0,0 +1,9 @@
+package objects
+
+// Indexable is an object that can take an index and return an object.
+type Indexable interface {
+ // IndexGet should take an index Object and return a result Object or an error.
+ // If error is returned, the runtime will treat it as a run-time error and ignore returned value.
+ // If nil is returned as value, it will be converted to Undefined value by the runtime.
+ IndexGet(index Object) (value Object, err error)
+}