linked-list-iterator and context operator $$ enhancement

This commit is contained in:
2026-05-18 09:49:44 +02:00
parent 35a599b284
commit 081395be5f
7 changed files with 47 additions and 76 deletions
+7 -3
View File
@@ -58,7 +58,11 @@ func evalContextValue(ctx kern.ExprContext, opTerm *scan.Term) (v any, err error
v = d
}
} else if childValue != nil {
if it, ok := childValue.(kern.Iterator); ok {
it, ok := childValue.(kern.Iterator)
if !ok {
it, err = NewIterator(ctx, childValue, nil)
}
if err == nil {
var item any
// values := kern.NewListA()
values := kern.NewLinkedListA()
@@ -70,8 +74,8 @@ func evalContextValue(ctx kern.ExprContext, opTerm *scan.Term) (v any, err error
err = nil
v = values
}
} else {
err = opTerm.ErrIncompatiblePrefixPostfixType(childValue)
// } else {
// err = opTerm.ErrIncompatiblePrefixPostfixType(childValue)
}
} else {
err = opTerm.ErrIncompatiblePrefixPostfixType(childValue)