list iterators now support start, stop e step
This commit is contained in:
+1
-10
@@ -9,15 +9,6 @@ import (
|
||||
"io"
|
||||
)
|
||||
|
||||
const (
|
||||
initName = "init"
|
||||
cleanName = "clean"
|
||||
resetName = "reset"
|
||||
nextName = "next"
|
||||
currentName = "current"
|
||||
indexName = "index"
|
||||
)
|
||||
|
||||
type dataCursor struct {
|
||||
ds map[string]Functor
|
||||
ctx ExprContext
|
||||
@@ -77,7 +68,7 @@ func (dc *dataCursor) HasOperation(name string) (exists bool) {
|
||||
|
||||
func (dc *dataCursor) CallOperation(name string, args []any) (value any, err error) {
|
||||
if name == indexName {
|
||||
value = dc.Index()
|
||||
value = int64(dc.Index())
|
||||
} else if functor, ok := dc.ds[name]; ok && isFunctor(functor) {
|
||||
if functor == dc.cleanFunc {
|
||||
value, err = dc.Clean()
|
||||
|
||||
Reference in New Issue
Block a user