mirror of
https://github.com/MontFerret/ferret.git
synced 2025-08-13 19:52:52 +02:00
@@ -2,7 +2,6 @@ package operators
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/collections"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/core"
|
||||
"github.com/MontFerret/ferret/pkg/runtime/values"
|
||||
)
|
||||
@@ -27,16 +26,6 @@ func NewRangeOperator(
|
||||
return &RangeOperator{&baseOperator{src, left, right}}, nil
|
||||
}
|
||||
|
||||
func (operator *RangeOperator) Iterate(ctx context.Context, scope *core.Scope) (collections.Iterator, error) {
|
||||
arr, err := operator.Exec(ctx, scope)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return collections.NewArrayIterator(arr.(*values.Array)), nil
|
||||
}
|
||||
|
||||
func (operator *RangeOperator) Exec(ctx context.Context, scope *core.Scope) (core.Value, error) {
|
||||
left, err := operator.left.Exec(ctx, scope)
|
||||
|
||||
|
Reference in New Issue
Block a user