fixed some defects in the iter-list implementation

This commit is contained in:
2024-06-05 08:06:39 +02:00
parent 188ea354ee
commit 8144122d2c
4 changed files with 16 additions and 22 deletions
-17
View File
@@ -148,23 +148,6 @@ func evalIterator(ctx ExprContext, self *term) (v any, err error) {
return
}
// func evalChildren(ctx ExprContext, terms []*term, firstChildValue any) (list *ListType, err error) {
// items := make(ListType, len(terms))
// for i, tree := range terms {
// var param any
// if i == 0 && firstChildValue != nil {
// param = firstChildValue
// } else if param, err = tree.compute(ctx); err != nil {
// break
// }
// items[i] = param
// }
// if err == nil {
// list = &items
// }
// return
// }
func evalSibling(ctx ExprContext, terms []*term, firstChildValue any) (list []any, err error) {
items := make([]any, 0, len(terms))
for i, tree := range terms {