refactored data-types to reduce plugin sizes
This commit is contained in:
+6
-3
@@ -9,6 +9,9 @@ import (
|
||||
|
||||
"git.portale-stac.it/go-pkg/expr/kern"
|
||||
"git.portale-stac.it/go-pkg/expr/scan"
|
||||
"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/list"
|
||||
)
|
||||
|
||||
func NewFormalIterator(value any) (it kern.Iterator) {
|
||||
@@ -26,11 +29,11 @@ func NewIterator(ctx kern.ExprContext, value any, ops []*scan.Term) (it kern.Ite
|
||||
}
|
||||
|
||||
switch v := value.(type) {
|
||||
case *kern.ListType:
|
||||
case *array.ListType:
|
||||
it = NewListIterator(v, nil)
|
||||
case *kern.LinkedList:
|
||||
case *list.LinkedList:
|
||||
it = NewLinkedListIterator(v, nil)
|
||||
case *kern.DictType:
|
||||
case *dict.DictType:
|
||||
it, err = NewDictIterator(v, nil)
|
||||
case []any:
|
||||
it = NewArrayIterator(v)
|
||||
|
||||
Reference in New Issue
Block a user