moved a subset of source file to the kern package
This commit is contained in:
+7
-3
@@ -4,6 +4,10 @@
|
||||
// operand-list.go
|
||||
package expr
|
||||
|
||||
import (
|
||||
"git.portale-stac.it/go-pkg/expr/kern"
|
||||
)
|
||||
|
||||
// -------- list term
|
||||
func newListTermA(args ...*term) *term {
|
||||
return newListTerm(0, 0, args)
|
||||
@@ -21,12 +25,12 @@ func newListTerm(row, col int, args []*term) *term {
|
||||
}
|
||||
|
||||
// -------- list func
|
||||
func evalList(ctx ExprContext, opTerm *term) (v any, err error) {
|
||||
func evalList(ctx kern.ExprContext, opTerm *term) (v any, err error) {
|
||||
list, _ := opTerm.value().([]*term)
|
||||
items := make(ListType, len(list))
|
||||
items := make(kern.ListType, len(list))
|
||||
for i, tree := range list {
|
||||
var param any
|
||||
if param, err = tree.compute(ctx); err != nil {
|
||||
if param, err = tree.Compute(ctx); err != nil {
|
||||
break
|
||||
}
|
||||
items[i] = param
|
||||
|
||||
Reference in New Issue
Block a user