temporary

This commit is contained in:
2024-04-26 21:03:22 +02:00
parent d2bab5fd9e
commit 894b1884eb
3 changed files with 34 additions and 11 deletions
+5 -5
View File
@@ -77,10 +77,7 @@ func evalIterator(ctx ExprContext, self *term) (v any, err error) {
return
}
dc := &dataCursor{
index: -1,
ctx: ctx.Clone(),
}
dc := newDataCursor(ctx)
if initFunc, exists := ds[initName]; exists && initFunc != nil {
var args []any
@@ -91,9 +88,12 @@ func evalIterator(ctx ExprContext, self *term) (v any, err error) {
} else {
args = []any{}
}
if dc.resource, err = initFunc.Invoke(dc.ctx, initName, args); err != nil {
initCtx := dc.ctx.Clone()
if dc.resource, err = initFunc.Invoke(initCtx, initName, args); err != nil {
return
}
exportObjects(dc.ctx, initCtx)
}
dc.nextFunc, _ = ds[nextName]