summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/d5/tengo/objects/indexable.go
blob: bbc8163361532ab954b1a2b1753a46b5379d292c (plain) (blame)
1
2
3
4
5
6
7
8
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)
}