linked-list-iterator and context operator $$ enhancement
This commit is contained in:
+7
-3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user