Linked-list: added support for operators '<<' and '>>'. Also fixed list insertion: ['x'] >> [1,2] must return [1,2,['x'], not [1,2,'x']; use $([]) to flat a list
This commit is contained in:
@@ -11,6 +11,15 @@ import (
|
||||
"git.portale-stac.it/go-pkg/expr/scan"
|
||||
)
|
||||
|
||||
func NewFormalIterator(value any) (it kern.Iterator) {
|
||||
if value == nil {
|
||||
it = NewArrayIterator([]any{})
|
||||
} else {
|
||||
it = NewArrayIterator([]any{value})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func NewIterator(ctx kern.ExprContext, value any, ops []*scan.Term) (it kern.Iterator, err error) {
|
||||
if value == nil {
|
||||
return NewArrayIterator([]any{}), nil
|
||||
|
||||
Reference in New Issue
Block a user