int-iterator is now defined interval
This commit is contained in:
+8
-5
@@ -13,6 +13,7 @@ import (
|
||||
"git.portale-stac.it/go-pkg/expr/sym"
|
||||
"git.portale-stac.it/go-pkg/expr/types/array"
|
||||
"git.portale-stac.it/go-pkg/expr/types/dict"
|
||||
"git.portale-stac.it/go-pkg/expr/types/interval"
|
||||
"git.portale-stac.it/go-pkg/expr/types/list"
|
||||
)
|
||||
|
||||
@@ -146,11 +147,13 @@ func evalIterator(ctx kern.ExprContext, opTerm *scan.Term) (v any, err error) {
|
||||
if args, err = evalSiblings(ctx, opTerm.Children, nil); err == nil {
|
||||
v = NewLinkedListIterator(ll, args)
|
||||
}
|
||||
} else if intVal, ok := firstChildValue.(int64); ok {
|
||||
var args []any
|
||||
if args, err = evalSiblings(ctx, opTerm.Children, intVal); err == nil {
|
||||
v, err = NewIntIterator(args)
|
||||
}
|
||||
} else if intervalVal, ok := firstChildValue.(*interval.IntervalType); ok {
|
||||
v, err = NewIntIteratorFromInterval(intervalVal)
|
||||
// } else if intVal, ok := firstChildValue.(int64); ok {
|
||||
// var args []any
|
||||
// if args, err = evalSiblings(ctx, opTerm.Children, intVal); err == nil {
|
||||
// v, err = NewIntIterator(args)
|
||||
// }
|
||||
} else if it, ok := firstChildValue.(kern.Iterator); ok {
|
||||
v, err = NewIterIter(it, ctx, opTerm.Children[1:])
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user