moved a subset of source file to the kern package
This commit is contained in:
+6
-3
@@ -4,6 +4,9 @@
|
||||
// operand-dict.go
|
||||
package expr
|
||||
|
||||
import (
|
||||
"git.portale-stac.it/go-pkg/expr/kern"
|
||||
)
|
||||
|
||||
// -------- dict term
|
||||
func newDictTerm(args map[any]*term) *term {
|
||||
@@ -18,12 +21,12 @@ func newDictTerm(args map[any]*term) *term {
|
||||
}
|
||||
|
||||
// -------- dict func
|
||||
func evalDict(ctx ExprContext, opTerm *term) (v any, err error) {
|
||||
func evalDict(ctx kern.ExprContext, opTerm *term) (v any, err error) {
|
||||
dict, _ := opTerm.value().(map[any]*term)
|
||||
items := make(DictType, len(dict))
|
||||
items := make(kern.DictType, len(dict))
|
||||
for key, tree := range dict {
|
||||
var param any
|
||||
if param, err = tree.compute(ctx); err != nil {
|
||||
if param, err = tree.Compute(ctx); err != nil {
|
||||
break
|
||||
}
|
||||
items[key] = param
|
||||
|
||||
Reference in New Issue
Block a user