int-iterator is now defined interval

This commit is contained in:
2026-07-28 07:16:49 +02:00
parent 8e596d5979
commit 648533cbe3
12 changed files with 90 additions and 70 deletions
+8 -5
View File
@@ -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 {