mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-16 11:37:36 +02:00
549b4abd3b
Implemented COLLECT key word
26 lines
479 B
Go
26 lines
479 B
Go
package collections
|
|
|
|
import (
|
|
"github.com/MontFerret/ferret/pkg/runtime/core"
|
|
"github.com/MontFerret/ferret/pkg/runtime/values"
|
|
)
|
|
|
|
type (
|
|
Collection interface {
|
|
Length() values.Int
|
|
}
|
|
|
|
IndexedCollection interface {
|
|
Collection
|
|
Get(idx values.Int) core.Value
|
|
Set(idx values.Int, value core.Value) error
|
|
}
|
|
|
|
KeyedCollection interface {
|
|
Collection
|
|
Keys() []string
|
|
Get(key values.String) (core.Value, values.Boolean)
|
|
Set(key values.String, value core.Value)
|
|
}
|
|
)
|