iterator.go: exported some const identifier
This commit is contained in:
+8
-8
@@ -66,7 +66,7 @@ func evalFirstChild(ctx ExprContext, iteratorTerm *term) (value any, err error)
|
||||
|
||||
func getDataSourceDict(iteratorTerm *term, firstChildValue any) (ds map[string]Functor, err error) {
|
||||
if dictAny, ok := firstChildValue.(*DictType); ok {
|
||||
requiredFields := []string{currentName, nextName}
|
||||
requiredFields := []string{CurrentName, NextName}
|
||||
fieldsMask := 0b11
|
||||
foundFields := 0
|
||||
ds = make(map[string]Functor)
|
||||
@@ -108,8 +108,8 @@ func evalIterator(ctx ExprContext, opTerm *term) (v any, err error) {
|
||||
}
|
||||
|
||||
if ds != nil {
|
||||
dc := newDataCursor(ctx, ds)
|
||||
if initFunc, exists := ds[initName]; exists && initFunc != nil {
|
||||
dc := NewDataCursor(ctx, ds)
|
||||
if initFunc, exists := ds[InitName]; exists && initFunc != nil {
|
||||
var args []any
|
||||
if len(opTerm.children) > 1 {
|
||||
if args, err = evalTermArray(ctx, opTerm.children[1:]); err != nil {
|
||||
@@ -120,16 +120,16 @@ func evalIterator(ctx ExprContext, opTerm *term) (v any, err error) {
|
||||
}
|
||||
|
||||
initCtx := dc.ctx.Clone()
|
||||
if dc.resource, err = initFunc.Invoke(initCtx, initName, args); err != nil {
|
||||
if dc.resource, err = initFunc.Invoke(initCtx, InitName, args); err != nil {
|
||||
return
|
||||
}
|
||||
exportObjects(dc.ctx, initCtx)
|
||||
}
|
||||
|
||||
dc.nextFunc = ds[nextName]
|
||||
dc.currentFunc = ds[currentName]
|
||||
dc.cleanFunc = ds[cleanName]
|
||||
dc.resetFunc = ds[resetName]
|
||||
dc.nextFunc = ds[NextName]
|
||||
dc.currentFunc = ds[CurrentName]
|
||||
dc.cleanFunc = ds[CleanName]
|
||||
dc.resetFunc = ds[ResetName]
|
||||
|
||||
v = dc
|
||||
} else if list, ok := firstChildValue.(*ListType); ok {
|
||||
|
||||
Reference in New Issue
Block a user